mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-26 00:24:54 +00:00
Merge pull request #342 from KiwiTechLLC/ZBKBCK-54
handled deactivated users for social login
This commit is contained in:
@ -90,6 +90,11 @@ class GoogleLoginMixin(object):
|
||||
ERROR_CODE["2071"],
|
||||
response_status=status.HTTP_400_BAD_REQUEST
|
||||
)
|
||||
if not junior_query.is_active:
|
||||
return custom_error_response(
|
||||
ERROR_CODE["2075"],
|
||||
response_status=status.HTTP_404_NOT_FOUND
|
||||
)
|
||||
serializer = JuniorSerializer(junior_query)
|
||||
elif str(user_type) == '2':
|
||||
guardian_query = Guardian.objects.filter(user=user_data.last()).last()
|
||||
@ -98,6 +103,11 @@ class GoogleLoginMixin(object):
|
||||
ERROR_CODE["2070"],
|
||||
response_status=status.HTTP_400_BAD_REQUEST
|
||||
)
|
||||
if not guardian_query.is_active:
|
||||
return custom_error_response(
|
||||
ERROR_CODE["2075"],
|
||||
response_status=status.HTTP_404_NOT_FOUND
|
||||
)
|
||||
serializer = GuardianSerializer(guardian_query)
|
||||
else:
|
||||
return custom_error_response(
|
||||
|
||||
Reference in New Issue
Block a user