Skip to content

Commit 6290218

Browse files
auvipypauloxnet
andauthored
Update rest_framework/serializers.py
Co-authored-by: Paolo Melchiorre <[email protected]>
1 parent 8c31636 commit 6290218

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rest_framework/serializers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1597,7 +1597,8 @@ def get_unique_together_validators(self):
15971597
validators = []
15981598
for unique_together, queryset, condition_fields, condition in self.get_unique_together_constraints(self.Meta.model):
15991599
# Skip if serializer does not map to all unique together sources
1600-
if not set(source_map).issuperset((*unique_together, *condition_fields)):
1600+
unique_together_and_condition_fields = (*unique_together, *condition_fields)
1601+
if not set(source_map).issuperset(unique_together_and_condition_fields):
16011602
continue
16021603

16031604
for source in (*unique_together, *condition_fields):

0 commit comments

Comments
 (0)