diff --git a/server.py b/server.py index eaf3bfa716be2304e963dd832eeabe77971ff063..e3a3533b2dd940465304e10875bd668328419e35 100644 --- a/server.py +++ b/server.py @@ -24,7 +24,7 @@ def to_xml(year_cert): if not 'error' in cert_doc: ###pprint(cert_doc) res = make_response(trans.cert_to_xml(cert_doc)) - res = utils.set_filename_header(res=res, no=year_cert.split("_")[1]) + res = utils.set_filename_header(res=res, no=year_cert.split("-")[1]) return res else: return utils.res_json(cert_doc) diff --git a/templates/xml/calibration_item.xml b/templates/xml/calibration_item.xml index aa494ecc8c63dddf7de0a2e4605dc60b48c0f8b3..308835b66083ddd028ffdd7b0f08ce71c35919cc 100644 --- a/templates/xml/calibration_item.xml +++ b/templates/xml/calibration_item.xml @@ -40,23 +40,6 @@ {% endfor -%} </dcc:name> </dcc:manufacturer> - <dcc:identifications> - {%- for j in i.identifications['identification'] %} - <dcc:identification> - <dcc:issuer>{{j.issuer}}</dcc:issuer> - <dcc:value>{{j.value}}</dcc:value> - <dcc:description> - {%- for k in j['description'] %} - <dcc:content lang="{{k.lang}}"> - {%- for l in k.content %} - {{l|safe}} - {% endfor -%} - </dcc:content> - {% endfor -%} - </dcc:description> - </dcc:identification> - {% endfor -%} - </dcc:identifications> </dcc:item> {% endfor -%} </dcc:items> diff --git a/templates/xml/core_data.xml b/templates/xml/core_data.xml index b2ccf17c73b093b571067507785061279e34a9d1..caa8d7c4e8cb482c4ed1ae1c1190c3df03cf9732 100644 --- a/templates/xml/core_data.xml +++ b/templates/xml/core_data.xml @@ -21,4 +21,22 @@ <dcc:endPerformanceDate> {{x.endPerformanceDate}} </dcc:endPerformanceDate> + <dcc:identifications> + {%- for i in x.identifications['identification'] %} + <dcc:identification> + <dcc:issuer>{{i.issuer}}</dcc:issuer> + <dcc:value>{{i.value}}</dcc:value> + <dcc:description> + {%- for j in i['description'] %} + <dcc:content lang="{{j.lang}}"> + {%- for k in j.content %} + {{k|safe}} + {% endfor -%} + </dcc:content> + {% endfor -%} + </dcc:description> + </dcc:identification> + {% endfor -%} + </dcc:identifications> + </dcc:coreData>