Commit b20b8e05 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Fixed wrong query normalization for returned api code. #436

parent 3c02155e
......@@ -386,8 +386,11 @@ data = response.json()'''.format(
def _filter_api_query(query):
def normalize_value(key, value):
quantity = search.search_quantities.get(key)
if quantity.many and not isinstance(value, list):
return [value]
if quantity.many:
if not isinstance(value, list):
return [value]
else:
return value
elif isinstance(value, list) and len(value) == 1:
return value[0]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment