Verified Commit f1d64e7c authored by Martin Matějek's avatar Martin Matějek
Browse files

show: Fix crash when no aggregated data exists

parent b930f3c9
......@@ -222,8 +222,9 @@ def query(query):
if aggregate:
flows = get_aggregate_data_from_archive(con, where_clause, where_parameters, filter)
flows += get_data_from_archive(con, where_clause, where_parameters, filter)
flows = aggregate_flows(flows)
flows.sort(key=lambda x: x[6]+x[7])
if flows:
flows = aggregate_flows(flows)
flows.sort(key=lambda x: x[6] + x[7])
else:
# sorted by time - archive data is always older than data from live database
flows = get_data_from_archive(con, where_clause, where_parameters, filter)
......
Markdown is supported
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