From 3feac914e3231f3a94e7b39d5e60ec7bb44686e7 Mon Sep 17 00:00:00 2001 From: Rolf Niepraschk <Rolf.Niepraschk@ptb.de> Date: Thu, 10 Sep 2020 11:26:43 +0200 Subject: [PATCH] "identifications" --> "coreData" --- server.py | 2 +- templates/xml/calibration_item.xml | 17 ----------------- templates/xml/core_data.xml | 18 ++++++++++++++++++ 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/server.py b/server.py index eaf3bfa..e3a3533 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 aa494ec..308835b 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 b2ccf17..caa8d7c 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> -- GitLab