Skip to content
Snippets Groups Projects
Commit df6aa52a authored by Karim Ahmed's avatar Karim Ahmed
Browse files

adressing creationtime=None

parent d9d2df0d
No related branches found
No related tags found
1 merge request!114Feat/updates agipd query versions
......@@ -482,10 +482,14 @@ def get_from_db(device, constant, condition, empty_constant,
metadata = ConstantMetaData()
metadata.calibration_constant = constant
metadata.detector_condition = condition
when = None
if creation_time is None:
metadata.calibration_constant_version = Versions.Now(
device=device)
else:
if hasattr(creation_time, 'isoformat'):
when = creation_time.isoformat()
metadata.calibration_constant_version = Versions.Timespan(
device=device,
start=creation_time)
......@@ -498,7 +502,7 @@ def get_from_db(device, constant, condition, empty_constant,
device))
r = metadata.retrieve(this_interface, timeout=timeout,
when=creation_time.isoformat(),
when=when,
meta_only=meta_only,
version_info=version_info)
if version_info:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment