diff --git a/account/views.py b/account/views.py index 1034d88..a656e0b 100644 --- a/account/views.py +++ b/account/views.py @@ -74,7 +74,7 @@ class GoogleLoginMixin(object): user_info = response.json() email = user_info['email'] first_name = user_info['given_name'] - last_name = user_info['family_name'] + last_name = user_info['family_name'] if 'family_name' in user_info and user_info['family_name'] else user_info['given_name'] profile_picture = user_info['picture'] except Exception as e: return custom_error_response(str(e), response_status=status.HTTP_400_BAD_REQUEST) diff --git a/base/messages.py b/base/messages.py index e36921f..3977895 100644 --- a/base/messages.py +++ b/base/messages.py @@ -96,8 +96,8 @@ ERROR_CODE = { "2067": "Action not allowed. User type missing.", "2068": "No guardian associated with this junior", "2069": "Invalid user type", - "2070": "You do not find as a guardian", - "2071": "You do not find as a junior", + "2070": "You are not registered as a guardian in our system. Please try again as junior.", + "2071": "You are not registered as a junior in our system. Please try again as guardian.", "2072": "You can not approve or reject this task because junior does not exist in the system", "2073": "You can not approve or reject this junior because junior does not exist in the system", "2074": "You can not complete this task because you does not exist in the system",