06/18 Update api/api/templates.py for iOS app to show active template only
This commit is contained in:
@@ -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()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user