|
@@ -47,15 +47,15 @@ class TemplateConfigListApi(Resource):
|
|
|
stmt = select(Template).where(Template.template_type == template_type)
|
|
|
|
|
|
if template_name:
|
|
|
- stmt.where(Template.name == template_name)
|
|
|
+ stmt = stmt.where(Template.name == template_name)
|
|
|
|
|
|
if template_format:
|
|
|
- stmt.where(Template.format == template_format)
|
|
|
+ stmt = stmt.where(Template.format == template_format)
|
|
|
|
|
|
if report_type:
|
|
|
- stmt.where(Template.report_type == report_type)
|
|
|
+ stmt = stmt.where(Template.report_type == report_type)
|
|
|
|
|
|
- stmt.offset(page_size * (page - 1)).limit(page_size)
|
|
|
+ stmt = stmt.offset(page_size * (page - 1)).limit(page_size)
|
|
|
|
|
|
results = session.execute(stmt).scalars().all()
|
|
|
|