forked from enviPath/enviPy
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:
@ -62,7 +62,7 @@ class UserManager(object):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_user_by_id(user, user_uuid: str):
|
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!")
|
raise ValueError("Getting user failed!")
|
||||||
return get_user_model().objects.get(uuid=user_uuid)
|
return get_user_model().objects.get(uuid=user_uuid)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user