mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-11 12:09:36 +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
|
# Conditionally add the data-initial-value attribute
|
||||||
if context.get("add_initial_value_attr", False):
|
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
|
# ask Django to give us the widget dict
|
||||||
# see Widget.get_context() on
|
# see Widget.get_context() on
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue