This commit is contained in:
Timothy Jaeryang Baek
2026-04-11 15:23:37 -06:00
parent b6db719758
commit 6acaaea59a
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -656,7 +656,7 @@ async def get_html_file_content_by_id(id: str, user=Depends(get_verified_user),
)
file_user = Users.get_user_by_id(file.user_id, db=db)
if not file_user.role == 'admin':
if not file_user or file_user.role != 'admin':
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
detail=ERROR_MESSAGES.NOT_FOUND,