Skip to content
Snippets Groups Projects
Commit 801fb843 authored by Geels, Brendan Ryan's avatar Geels, Brendan Ryan :tophat:
Browse files

Undo overzealous 'replace-all'

parent 6e331efb
No related branches found
No related tags found
1 merge request!332Update metadata factory with timeouts and docstrings + use timeouts in instrument calibrations
...@@ -202,7 +202,7 @@ def parse_params(query: MetadataQuery) -> str: ...@@ -202,7 +202,7 @@ def parse_params(query: MetadataQuery) -> str:
A dictionary of parameters formatted for the API request. A dictionary of parameters formatted for the API request.
""" """
query = query.dict(exclude_none=True) query = query.dict(exclude_none=True)
Parameters = {} args = {}
for key in query.keys(): for key in query.keys():
element = query[key] element = query[key]
# Convert times to ISO format strings # Convert times to ISO format strings
...@@ -210,9 +210,9 @@ def parse_params(query: MetadataQuery) -> str: ...@@ -210,9 +210,9 @@ def parse_params(query: MetadataQuery) -> str:
element = element.isoformat() element = element.isoformat()
# Serialize the metadata dictionary to a JSON string # Serialize the metadata dictionary to a JSON string
elif key == "metadata" and isinstance(element, dict): elif key == "metadata" and isinstance(element, dict):
Parameters[key] = json.dumps(element) args[key] = json.dumps(element)
# Get string value of metadata category # Get string value of metadata category
if key == "category": if key == "category":
element = element.value element = element.value
Parameters[key] = element args[key] = element
return Parameters return args
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