diff options
author | Illia Volochii <illia.volochii@gmail.com> | 2016-12-27 16:42:17 +0200 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2016-12-27 09:42:17 -0500 |
commit | 4a51ba228b2c416a115aee3bc034683eb02482c3 (patch) | |
tree | 5340b8b7a09a9ad8f92907fd43a5ba6664ed675d /django/forms/utils.py | |
parent | 3e5c5e6754648590e87725b66d11d283079728e6 (diff) | |
download | django-4a51ba228b2c416a115aee3bc034683eb02482c3.tar.gz |
Fixed #27642 -- Made forms.utils.flatatt() omit 'None' values from attrs.
Diffstat (limited to 'django/forms/utils.py')
-rw-r--r-- | django/forms/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/forms/utils.py b/django/forms/utils.py index dc4df86058..88086b2c64 100644 --- a/django/forms/utils.py +++ b/django/forms/utils.py @@ -40,7 +40,7 @@ def flatatt(attrs): if isinstance(value, bool): if value: boolean_attrs.append((attr,)) - else: + elif value is not None: key_value_attrs.append((attr, value)) return ( |