diff --git a/app/internal/font.py b/app/internal/font.py index 9320fdbf..90731724 100755 --- a/app/internal/font.py +++ b/app/internal/font.py @@ -52,8 +52,10 @@ def get_available_fonts(db: Session) -> list[AvailableFont]: List of AvailableFont objects for all defined Fonts. """ + # Cannot be AvailableFont object as these are directly passed to + # Jinja templates return [ - AvailableFont(id=font.id, name=font.name) + {'id': font.id, 'name': font.name} # type: ignore for font in db.query( Font.id, diff --git a/app/internal/templates.py b/app/internal/templates.py index 77480aa9..04419e9b 100755 --- a/app/internal/templates.py +++ b/app/internal/templates.py @@ -152,11 +152,13 @@ def get_available_templates(db: Session) -> list[AvailableTemplate]: db: SQL database to query for the given object. Returns: - List of AvailableTemplate objects for all defined Templates. + List of dictionaries for all defined Templates. """ + # Cannot be AvailableTemplate objects as this return is passed + # directly to Jinja templates return [ - AvailableTemplate(id=template.id, name=template.name) + {'id': template.id, 'name': template.name} # type: ignore for template in db.query( Template.id, diff --git a/modules/ref/version_webui b/modules/ref/version_webui index e8b4b6d9..723f5df4 100755 --- a/modules/ref/version_webui +++ b/modules/ref/version_webui @@ -1 +1 @@ -v2.0-alpha.13.0-webui35 \ No newline at end of file +v2.0-alpha.13.0-webui36 \ No newline at end of file