Commit cc4f20e8 authored by Samuel Gaist's avatar Samuel Gaist
Browse files

[plotters] Fix mutating ordered dict while iterating

parent 7510391b
Pipeline #19989 passed with stages
in 27 minutes and 37 seconds
......@@ -245,8 +245,9 @@ def plot(webapi, prefix, names, force, need_data_sample, inputdata, outputimage,
data = common.fetch_object(webapi, 'plotterparameter', df['parameter'], ['data'])
if data is not None:
for key in data['data'].keys():
if key not in core_plotter.parameters: del data['data'][key]
to_remove = [key for key in data['data'].keys() if key not in core_plotter.parameters]
for key in to_remove:
del data['data'][key]
data['data'].setdefault('content_type', 'image/png') #in case not set
......
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