Skip to content

Commit

Permalink
removed: password field from user serializer
Browse files Browse the repository at this point in the history
  • Loading branch information
abdahmed22 committed Sep 16, 2024
1 parent 0c506eb commit 48ce7d2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion server/test_tracker/serializers/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 0 additions & 4 deletions server/test_tracker/views/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 48ce7d2

Please sign in to comment.