summaryrefslogtreecommitdiff
path: root/django/contrib/postgres/validators.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2017-05-27 16:08:46 -0700
committerTim Graham <timograham@gmail.com>2017-05-27 19:08:46 -0400
commit21046e77734278cea871dce922220bf29aa5b7b4 (patch)
treee0820850a3d058c35307916da793668f7e5c48b3 /django/contrib/postgres/validators.py
parent2a5708a304cf337dbf556e2bd87a930079f8f766 (diff)
downloaddjango-21046e77734278cea871dce922220bf29aa5b7b4.tar.gz
Fixed #28249 -- Removed unnecessary dict.keys() calls.
iter(dict) is equivalent to iter(dict.keys()).
Diffstat (limited to 'django/contrib/postgres/validators.py')
-rw-r--r--django/contrib/postgres/validators.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/postgres/validators.py b/django/contrib/postgres/validators.py
index 9d256d8d83..8a4c84fb65 100644
--- a/django/contrib/postgres/validators.py
+++ b/django/contrib/postgres/validators.py
@@ -41,7 +41,7 @@ class KeysValidator:
self.messages.update(messages)
def __call__(self, value):
- keys = set(value.keys())
+ keys = set(value)
missing_keys = self.keys - keys
if missing_keys:
raise ValidationError(