fix: 'Bill Type: Invalid Choice: could not coerce' error

Error introduced in #1290. Fixes #1293. WTForms needs to be bumped to >=2.3.2
as it includes a fix to `SelectField` which is required for this change to work.

See:
  - https://wtforms.readthedocs.io/en/3.1.x/changes/#version-2-3-2
  - https://github.com/wtforms/wtforms/pull/598
This commit is contained in:
Timo Riski 2024-03-23 16:49:42 +02:00 committed by zorun
parent ae1cc309d7
commit a3d4e4250d
2 changed files with 2 additions and 2 deletions

View file

@ -58,7 +58,7 @@ class BillType(Enum):
@classmethod
def choices(cls):
return [(choice, choice.value) for choice in cls]
return [(choice.value, choice.value) for choice in cls]
db = SQLAlchemy()

View file

@ -39,7 +39,7 @@ dependencies = [
"Flask-SQLAlchemy>=2.4,<3",
"Flask-Talisman>=0.8,<2",
"Flask-WTF>=0.14.3,<2",
"WTForms>=2.3.1,<3.2",
"WTForms>=2.3.3,<3.2",
"Flask>=2,<3",
"Werkzeug>=2,<3",
"itsdangerous>=2,<3",