From 48ce7d205db8efacf9c94b40f8f158b60eaf93e7 Mon Sep 17 00:00:00 2001 From: abdahmed22 Date: Mon, 16 Sep 2024 11:53:14 +0300 Subject: [PATCH] removed: password field from user serializer --- server/test_tracker/serializers/auth.py | 2 +- server/test_tracker/views/auth.py | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/server/test_tracker/serializers/auth.py b/server/test_tracker/serializers/auth.py index ca0456c..f4cf028 100644 --- a/server/test_tracker/serializers/auth.py +++ b/server/test_tracker/serializers/auth.py @@ -106,7 +106,7 @@ class UpdateUserSettingsSerializer(ModelSerializer): class Meta: model = User - fields = ["first_name", "last_name", "phone", "password"] + fields = ["first_name", "last_name", "phone"] class GitHubRequestToGetAccessTokenSerializers(Serializer): client_id = CharField() diff --git a/server/test_tracker/views/auth.py b/server/test_tracker/views/auth.py index 9be3ebc..734a68e 100644 --- a/server/test_tracker/views/auth.py +++ b/server/test_tracker/views/auth.py @@ -154,10 +154,6 @@ def put(self, request: Request) -> Response: """Update user settings""" user = get_user_by_id(request.user.id) serializer = self.get_serializer(user, data=request.data) - # if not request.data.get("password"): - # request.data["password"] = user.password - # else: - # request.data["password"] = make_password(request.data["password"]) if serializer.is_valid(): serializer.save() return CustomResponse.success(