1
0
mirror of https://github.com/django/django.git synced 2025-10-26 07:06:08 +00:00

Fixed #26283 -- Fixed removal of trailing nulls for SplitArrayField.

This commit is contained in:
quaspas
2016-03-12 16:44:39 -05:00
committed by Tim Graham
parent ab8af342b1
commit 91f87b8f91
2 changed files with 15 additions and 1 deletions

View File

@@ -183,7 +183,7 @@ class SplitArrayField(forms.Field):
null_index = i
else:
break
if null_index:
if null_index is not None:
cleaned_data = cleaned_data[:null_index]
errors = errors[:null_index]
errors = list(filter(None, errors))