06/18 Update api/api/templates.py for iOS app to show active template only

This commit is contained in:
Nguyen Ngo
2026-06-18 14:25:42 -04:00
parent bf9a81ce5f
commit d21ad36bf5
+2
View File
@@ -37,6 +37,7 @@ def _template_summary_payload(template: InspectionTemplate) -> dict:
'name': template.name,
'description': template.description or '',
'frequency': template.frequency or '',
'is_active': template.active,
}
@@ -88,6 +89,7 @@ def list_templates():
templates = (
InspectionTemplate.query
.filter_by(active=True)
.order_by(InspectionTemplate.name)
.all()
)