Error handling in following functions

This commit is contained in:
2026-05-16 17:18:31 +02:00
parent e4b405cdbd
commit 6daf2345be
2 changed files with 2 additions and 5 deletions

View File

@@ -28,8 +28,6 @@ def get_password_hash(password):
def get_user(db, username: str):
user = db.exec(select(UserDB).where(UserDB.name == username)).first()
if user is None:
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="Username not found in get_user, this shouldn't happen")
return user
def authenticate_user(db, username: str, password: str):