Fixed UUID vs str comparison when getting User (#42)

Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Reviewed-on: enviPath/enviPy#42
This commit is contained in:
2025-07-31 09:11:52 +12:00
parent c9d6d8b024
commit 280ddc7205

View File

@ -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)