Fix logout type mismatch

This commit is contained in:
april
2024-01-02 17:39:37 -06:00
parent 5b6ed389c4
commit ca59125a85
4 changed files with 12 additions and 5 deletions

View File

@@ -50,7 +50,7 @@ async def get_flight(flight_id: str, user: UserDisplaySchema = Depends(get_curre
:return: Flight details
"""
flight = await db.retrieve_flight(flight_id)
if flight.user != user.id and AuthLevel(user.level) != AuthLevel.ADMIN:
if str(flight.user) != user.id and AuthLevel(user.level) != AuthLevel.ADMIN:
logger.info("Attempted access to unauthorized flight by %s", user.username)
raise HTTPException(403, "Unauthorized access")