From 280ddc7205d87df960b5c3b25e125f6599c4821d Mon Sep 17 00:00:00 2001 From: jebus Date: Thu, 31 Jul 2025 09:11:52 +1200 Subject: [PATCH] Fixed UUID vs str comparison when getting User (#42) Co-authored-by: Tim Lorsbach Reviewed-on: https://git.envipath.com/enviPath/enviPy/pulls/42 --- epdb/logic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epdb/logic.py b/epdb/logic.py index 62d4f585..6fa01c67 100644 --- a/epdb/logic.py +++ b/epdb/logic.py @@ -62,7 +62,7 @@ class UserManager(object): @staticmethod def get_user_by_id(user, user_uuid: str): - if user.uuid != user_uuid and not user.is_superuser: + if str(user.uuid) != user_uuid and not user.is_superuser: raise ValueError("Getting user failed!") return get_user_model().objects.get(uuid=user_uuid)