diff options
| author | Sergey Fedoseev <fedoseev.sergey@gmail.com> | 2018-09-28 18:57:12 +0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-09-28 09:57:12 -0400 |
| commit | 8ef8bc0f64c463684268a7c55f3d3da4de066c0d (patch) | |
| tree | 9c3ab782c6382bdbc91363d0dd5513df83381903 /django/contrib/postgres/fields/array.py | |
| parent | 4fc8fb7ddaad495d45d53df58b2d13115857b3c7 (diff) | |
Refs #28909 -- Simplifed code using unpacking generalizations.
Diffstat (limited to 'django/contrib/postgres/fields/array.py')
| -rw-r--r-- | django/contrib/postgres/fields/array.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/django/contrib/postgres/fields/array.py b/django/contrib/postgres/fields/array.py index a6079466af..b87575235e 100644 --- a/django/contrib/postgres/fields/array.py +++ b/django/contrib/postgres/fields/array.py @@ -28,8 +28,7 @@ class ArrayField(CheckFieldDefaultMixin, Field): self.base_field = base_field self.size = size if self.size: - self.default_validators = self.default_validators[:] - self.default_validators.append(ArrayMaxLengthValidator(self.size)) + self.default_validators = [*self.default_validators, ArrayMaxLengthValidator(self.size)] # For performance, only add a from_db_value() method if the base field # implements it. if hasattr(self.base_field, 'from_db_value'): |
