Skip to content
Snippets Groups Projects
Commit 9e2165c4 authored by Thomas Bock's avatar Thomas Bock :speech_balloon:
Browse files

transfer request id to cert and dcc

parent 8d0c61c5
No related branches found
No related tags found
No related merge requests found
......@@ -100,6 +100,7 @@ class Trans:
maintainers = self.db.get_maintainers()
countries = self.db.get_countries()
cert = {
"RequestId": utils.get_request_id(cal_docs=cal_docs),
"Meta": utils.get_meta(cal_docs=cal_docs),
"Titlepage": utils.get_titlepage(cal_docs=cal_docs, countries=countries, maintainers=maintainers),
"Device": utils.get_device(cal_docs=cal_docs),
......@@ -132,6 +133,7 @@ class Trans:
lang = utils.get_lang(info_doc)
begin_meas_date, end_meas_date = utils.meas_date_begin_end(cal_docs)
cert = {
"RequestId": utils.get_request_id(cal_docs=cal_docs),
"Meta": utils.get_meta(cal_docs=cal_docs),
"Device": utils.get_device(cal_docs=cal_docs),
"Helper":{"gas_trans":self.gas_trans, "meas_type_trans":self.meas_type_trans},
......
......@@ -66,6 +66,11 @@ def get_meta(cal_docs):
return meta
def get_request_id(cal_docs):
doc = cal_docs[-1]
return doc.get("Calibration", {}).get("Presettings", {}).get("RequestId")
def get_last_cert(cal_docs):
"""Returns the last Cert sign or None.
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment