summaryrefslogtreecommitdiff
path: root/django/contrib/postgres/validators.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/contrib/postgres/validators.py')
-rw-r--r--django/contrib/postgres/validators.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/django/contrib/postgres/validators.py b/django/contrib/postgres/validators.py
index 45bf8e1e13..db6205f356 100644
--- a/django/contrib/postgres/validators.py
+++ b/django/contrib/postgres/validators.py
@@ -1,5 +1,3 @@
-import copy
-
from django.core.exceptions import ValidationError
from django.core.validators import (
MaxLengthValidator, MaxValueValidator, MinLengthValidator,
@@ -37,8 +35,7 @@ class KeysValidator:
self.keys = set(keys)
self.strict = strict
if messages is not None:
- self.messages = copy.copy(self.messages)
- self.messages.update(messages)
+ self.messages = {**self.messages, **messages}
def __call__(self, value):
keys = set(value)