Skip to content

Commit d121826

Browse files
auvipypauloxnet
andauthored
Update rest_framework/validators.py
Co-authored-by: Paolo Melchiorre <[email protected]>
1 parent 7bd7e30 commit d121826

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

rest_framework/validators.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,7 @@ def __call__(self, attrs, serializer):
185185
if field in self.fields and value != getattr(serializer.instance, field)
186186
]
187187

188-
condition_kwargs = {
189-
source: attrs[source]
190-
for source in self.condition_fields
191-
}
188+
condition_kwargs = {source: attrs[source] for source in self.condition_fields}
192189
if checked_values and None not in checked_values and qs_exists_with_condition(queryset, self.condition, condition_kwargs):
193190
field_names = ', '.join(self.fields)
194191
message = self.message.format(field_names=field_names)

0 commit comments

Comments
 (0)