@@ -59,7 +59,6 @@ def _to_detail(template: FormTemplate) -> TemplateDetail:
5959 jurisdiction = template .jurisdiction ,
6060 agency_type = template .agency_type ,
6161 fields = template .fields ,
62- field_mappings_from_incident = template .field_mappings_from_incident ,
6362 source_standard = template .source_standard ,
6463 pdf_template_ref = template .pdf_template_ref ,
6564 version = template .version ,
@@ -102,8 +101,7 @@ def create_template(db: Session, body: CreateTemplateRequest) -> TemplateDetail:
102101 display_name = body .display_name ,
103102 jurisdiction = body .jurisdiction ,
104103 agency_type = body .agency_type ,
105- fields = [f .model_dump () for f in body .fields ],
106- field_mappings_from_incident = body .field_mappings_from_incident ,
104+ fields = [f .model_dump (mode = "json" ) for f in body .fields ],
107105 source_standard = body .source_standard ,
108106 pdf_template_ref = body .pdf_template_ref ,
109107 )
@@ -129,8 +127,7 @@ def replace_template(
129127 template .display_name = body .display_name
130128 template .jurisdiction = body .jurisdiction
131129 template .agency_type = body .agency_type
132- template .fields = [f .model_dump () for f in body .fields ]
133- template .field_mappings_from_incident = body .field_mappings_from_incident
130+ template .fields = [f .model_dump (mode = "json" ) for f in body .fields ]
134131 template .source_standard = body .source_standard
135132 template .pdf_template_ref = body .pdf_template_ref
136133 template .updated_at = datetime .now (timezone .utc )
0 commit comments