From 53097a85d5d924c6ea5d207f7537ec9e4902c114 Mon Sep 17 00:00:00 2001 From: Ilya Belokobylsky Date: Mon, 16 Dec 2024 15:51:56 +0300 Subject: [PATCH] Update user_service.py --- app/user_service.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/user_service.py b/app/user_service.py index 10a8f93..f543429 100644 --- a/app/user_service.py +++ b/app/user_service.py @@ -82,6 +82,7 @@ def get_user_by_id(user_id: str): """, {"user_id": user_id} ) + if not result or len(result) == 0: raise HTTPException(status_code=404, detail="User not found") return result[0]