Skip to content

Commit

Permalink
Minor fix to validation
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-Jess committed Mar 18, 2024
1 parent 89b0d6a commit c078671
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/sublet/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def update(self, instance, validated_data):
or self.context["request"].user.is_superuser
):
if instance.is_draft:
self.validate_not_draft(validated_data)
self.validate_not_draft(validated_data, instance)

Check warning on line 138 in backend/sublet/serializers.py

View check run for this annotation

Codecov / codecov/patch

backend/sublet/serializers.py#L138

Added line #L138 was not covered by tests
instance = super().update(instance, validated_data)
instance.save()
return instance
Expand Down

0 comments on commit c078671

Please sign in to comment.