1
0
mirror of https://github.com/django/django.git synced 2025-10-30 00:56:09 +00:00

Made small readability improvements.

This commit is contained in:
Martin Thoma
2020-09-24 18:37:55 +02:00
committed by Mariusz Felisiak
parent 4eb756793b
commit 302caa40e4
13 changed files with 52 additions and 62 deletions

View File

@@ -696,7 +696,7 @@ class QuerySet:
field_name != 'pk' and
not opts.get_field(field_name).unique and
field_name not in unique_fields and
not self.query.distinct_fields == (field_name,)
self.query.distinct_fields != (field_name,)
):
raise ValueError("in_bulk()'s field_name must be a unique field but %r isn't." % field_name)
if id_list is not None: