mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-01 15:34:53 +02:00
fixed bug with data-initial-value of 0
This commit is contained in:
parent
1fa307dd7e
commit
0ad4f2b84f
1 changed files with 1 additions and 1 deletions
|
@ -175,7 +175,7 @@ def input_with_errors(context, field=None): # noqa: C901
|
|||
|
||||
# Conditionally add the data-initial-value attribute
|
||||
if context.get("add_initial_value_attr", False):
|
||||
attrs["data-initial-value"] = field.initial or ""
|
||||
attrs["data-initial-value"] = field.initial if field.initial is not None else ""
|
||||
|
||||
# ask Django to give us the widget dict
|
||||
# see Widget.get_context() on
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue