switch back to empty string as default

WTForm backward compatibility needs that
This commit is contained in:
Glandos 2021-11-13 21:35:28 +01:00
parent fdbc4c0447
commit e861322a56
2 changed files with 3 additions and 3 deletions

View file

@ -325,7 +325,7 @@ class BillForm(FlaskForm):
original_currency = SelectField(_("Currency"), validators=[DataRequired()]) original_currency = SelectField(_("Currency"), validators=[DataRequired()])
external_link = URLField( external_link = URLField(
_("External link"), _("External link"),
default=None, default="",
validators=[Optional(), URL()], validators=[Optional(), URL()],
description=_("A link to an external document, related to this bill"), description=_("A link to an external document, related to this bill"),
) )

View file

@ -539,7 +539,7 @@ class APITestCase(IhatemoneyTestCase):
"amount": expected_amount, "amount": expected_amount,
"date": "2011-08-10", "date": "2011-08-10",
"id": id, "id": id,
"external_link": None, "external_link": "",
"original_currency": "XXX", "original_currency": "XXX",
"converted_amount": expected_amount, "converted_amount": expected_amount,
} }
@ -834,7 +834,7 @@ class APITestCase(IhatemoneyTestCase):
"amount": 25.0, "amount": 25.0,
"date": "2011-08-10", "date": "2011-08-10",
"id": 1, "id": 1,
"external_link": None, "external_link": "",
"converted_amount": 25.0, "converted_amount": 25.0,
"original_currency": "XXX", "original_currency": "XXX",
} }