first commit
This commit is contained in:
commit
3e4574dcdd
163 files changed
+3559
No files matched your search
@@ -0,0 +1,11 @@
|
||||
from apps.userprofile.models import UserProfile as UserProfileModel
|
||||
from rest_framework.validators import ValidationError
|
||||
|
||||
|
||||
def get_user_profile(user_id: int):
|
||||
try:
|
||||
return UserProfileModel.objects.get(cuser_id=user_id)
|
||||
except UserProfileModel.DoesNotExist:
|
||||
raise ValidationError("User profile does not exist")
|
||||
except Exception as exp:
|
||||
raise ValidationError(exp)
|
||||
Reference in new issue
Block a user