Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
robines committed Nov 22, 2024
1 parent 8de5b8c commit 3f79f1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/samfundet/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,13 @@ class ChangePasswordSerializer(serializers.Serializer):
new_password = serializers.CharField(required=True)

def validate_current_password(self, value: str) -> str:
user = self.context["request"].user
user = self.context['request'].user
if not user.check_password(value):
raise serializers.ValidationError('Incorrect current password')
return value

def validate_new_password(self, value: str) -> str:
user = self.context["request"].user
user = self.context['request'].user
validate_password(value, user)
return value

Expand Down

0 comments on commit 3f79f1f

Please sign in to comment.