enabled user field fixed

This commit is contained in:
zurdi
2023-08-23 16:50:31 +02:00
parent 205ef129e1
commit fdc84c5cf7

View File

@@ -68,7 +68,7 @@ async def get_current_active_user_from_token(token: str):
if user is None:
raise credentials_exception
if user.disabled:
if not user.enabled:
raise HTTPException(
status_code=status.HTTP_401_UNAUTHORIZED, detail="Inactive user"
)