Skip to content

Commit a4739c4

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rest_framework/validators.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ def qs_exists_with_condition(queryset, condition, against):
2828
if condition is None:
2929
return qs_exists(queryset)
3030
try:
31-
# use the same query as UniqueConstraint.validate https://github.com/django/django/blob/7ba2a0db20c37a5b1500434ca4ed48022311c171/django/db/models/constraints.py#L672
31+
# use the same query as UniqueConstraint.validate
32+
# https://github.com/django/django/blob/7ba2a0db20c37a5b1500434ca4ed48022311c171/django/db/models/constraints.py#L672
3233
return (condition & Exists(queryset.filter(condition))).check(against)
3334
except (TypeError, ValueError, DataError):
3435
return False

0 commit comments

Comments
 (0)