Commit 8b8550fd authored by Samuel GAIST's avatar Samuel GAIST
Browse files

Merge branch 'dict_mutation_fix' into '1.4.x'

[plotters] Fix mutating ordered dict while iterating

See merge request !20
parents 7510391b cc4f20e8
Pipeline #19990 passed with stages
in 49 minutes and 7 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