Skip to content
Snippets Groups Projects
Commit 95b6be75 authored by Nathan Bockisch's avatar Nathan Bockisch
Browse files

Merge branch 'ws-1992-add-image-wrester' into '2.8.2.1-DEVELOMENT'

Just kidding, turns out it's a list of tuples

See merge request !1514
parents b619d8de 75baedb4
No related branches found
No related tags found
2 merge requests!1605Merge 2.8.2.3 work to main,!1514Just kidding, turns out it's a list of tuples
Pipeline #12771 passed
...@@ -436,7 +436,8 @@ class WrestWorkflowMetadata: ...@@ -436,7 +436,8 @@ class WrestWorkflowMetadata:
data = cursor.fetchall() data = cursor.fetchall()
if data: if data:
# This should have all the ancillary and science product names # This should have all the ancillary and science product names
make_json = json.dumps({"filesList": sum(data, [])}) # It returns from the query as a list of tuples, so it must be flattened
make_json = json.dumps({"filesList": list(sum(data, ()))})
else: else:
self.logger.error(f"ERROR: Failed to fetch products from product ID {product_group_id}") self.logger.error(f"ERROR: Failed to fetch products from product ID {product_group_id}")
else: else:
......
...@@ -900,3 +900,4 @@ def main(global_config, **settings): ...@@ -900,3 +900,4 @@ def main(global_config, **settings):
config.add_tween("workflow.server.prometheus_route_timing_factory") config.add_tween("workflow.server.prometheus_route_timing_factory")
return config.make_wsgi_app() return config.make_wsgi_app()
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