summaryrefslogtreecommitdiff
path: root/django/contrib/postgres
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2025-03-24 21:18:58 -0400
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2025-03-25 12:02:14 +0100
commitfecca298a2c6de22b054eaffeb4368b1167c7fd5 (patch)
treebba2eda57f8735eec1bae3d1e65c47b44a5efdc3 /django/contrib/postgres
parent7164f080474ef0213d1d6e625db647c45c36a5fb (diff)
Fixed #36276 -- Omitted size=None from ArrayField.deconstruct().
Diffstat (limited to 'django/contrib/postgres')
-rw-r--r--django/contrib/postgres/fields/array.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/django/contrib/postgres/fields/array.py b/django/contrib/postgres/fields/array.py
index 28c0f6679e..88df368c73 100644
--- a/django/contrib/postgres/fields/array.py
+++ b/django/contrib/postgres/fields/array.py
@@ -134,12 +134,9 @@ class ArrayField(CheckFieldDefaultMixin, Field):
name, path, args, kwargs = super().deconstruct()
if path == "django.contrib.postgres.fields.array.ArrayField":
path = "django.contrib.postgres.fields.ArrayField"
- kwargs.update(
- {
- "base_field": self.base_field.clone(),
- "size": self.size,
- }
- )
+ kwargs["base_field"] = self.base_field.clone()
+ if self.size is not None:
+ kwargs["size"] = self.size
return name, path, args, kwargs
def to_python(self, value):