From a417c0efb4b37fe9f59d7b982b2ecf276bf2e306 Mon Sep 17 00:00:00 2001 From: GappleBee Date: Sat, 14 Sep 2024 10:26:12 +0100 Subject: Fixed #35449 -- Fixed validation of array items in SplitArrayField when remove_trailing_nulls=True. --- django/contrib/postgres/forms/array.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django/contrib/postgres/forms/array.py') diff --git a/django/contrib/postgres/forms/array.py b/django/contrib/postgres/forms/array.py index ddb022afc3..fd5cd219f8 100644 --- a/django/contrib/postgres/forms/array.py +++ b/django/contrib/postgres/forms/array.py @@ -228,7 +228,7 @@ class SplitArrayField(forms.Field): params={"nth": index + 1}, ) ) - cleaned_data.append(None) + cleaned_data.append(item) else: errors.append(None) cleaned_data, null_index = self._remove_trailing_nulls(cleaned_data) -- cgit v1.3