diff --git a/api/dashboard/profile/profile_serializer.py b/api/dashboard/profile/profile_serializer.py index 1379451f..3839a3a8 100644 --- a/api/dashboard/profile/profile_serializer.py +++ b/api/dashboard/profile/profile_serializer.py @@ -438,7 +438,7 @@ class UserTermSerializer(serializers.ModelSerializer): class Meta: - model = user_settings + model = UserSettings fields =[ "is_userterms_approved", "user", diff --git a/api/dashboard/profile/profile_view.py b/api/dashboard/profile/profile_view.py index 5548858c..555789d5 100644 --- a/api/dashboard/profile/profile_view.py +++ b/api/dashboard/profile/profile_view.py @@ -454,13 +454,13 @@ def post(self, request,muid): return CustomResponse(response="The given muid seems to be invalid").get_failure_response() return CustomResponse(response=response_data).get_failure_response() - def get(self,request,muid): - user = User.objects.get(muid=muid) - try: - settings = UserSettings.objects.get(user=user) - except UserSettings.DoesNotExist: - return CustomResponse(response="The user settings doesn't exists").get_failure_response() - if settings.is_userterms_approved: - return CustomResponse(response=response_data).get_success_response() - else: - return CustomResponse(response=response_data).get_failure_response() + def get(self,request,muid): + user = User.objects.get(muid=muid) + try: + settings = UserSettings.objects.get(user=user) + except UserSettings.DoesNotExist: + return CustomResponse(response="The user settings doesn't exists").get_failure_response() + if settings.is_userterms_approved: + return CustomResponse(response=response_data).get_success_response() + else: + return CustomResponse(response=response_data).get_failure_response()