mirror of
https://github.com/django/django.git
synced 2025-10-29 00:26:07 +00:00
Fixed #27642 -- Made forms.utils.flatatt() omit 'None' values from attrs.
This commit is contained in:
committed by
Tim Graham
parent
3e5c5e6754
commit
4a51ba228b
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user