diff --git a/api/integrations/wadhwani/wadhwani_views.py b/api/integrations/wadhwani/wadhwani_views.py index 0ec6c2eb..70627777 100644 --- a/api/integrations/wadhwani/wadhwani_views.py +++ b/api/integrations/wadhwani/wadhwani_views.py @@ -33,6 +33,10 @@ def post(self, request): url = settings.WADHWANI_BASE_URL + "/api/v1/iamservice/oauth/login" user_id = JWTUtils.fetch_user_id(request) user = User.objects.get(id=user_id) + if not user.mobile: + return CustomResponse( + general_message="Please update your mobile number and try again." + ).get_failure_response() if not (token := request.data.get("Client-Auth-Token", None)): return CustomResponse( general_message="Token is required"