We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4a4bbbd commit fb91efcCopy full SHA for fb91efc
tests/test_unique_fields_mixin.py
@@ -68,3 +68,12 @@ def test_create_update_failed(self):
68
ctx.exception.detail,
69
{'child': {'field': ['This field must be unique.']}}
70
)
71
+
72
+ def test_unique_field_not_required_for_partial_updates(self):
73
+ child = models.UFMChild.objects.create(field='value')
74
+ serializer = serializers.UFMChildSerializer(
75
+ instance=child,
76
+ data={},
77
+ partial=True
78
+ )
79
+ self.assertTrue(serializer.is_valid())
0 commit comments