workflows: limit automatic id_display handling to POSTs (#45668)

This commit is contained in:
Frédéric Péters 2020-07-31 16:54:17 +02:00
parent fad0092c65
commit 1444d8a124
1 changed files with 6 additions and 1 deletions

View File

@ -382,7 +382,12 @@ class WebserviceCallStatusItem(WorkflowStatusItem):
response, data=data, exc_info=sys.exc_info())
else:
workflow_data['%s_response' % self.varname] = d
if isinstance(d, dict):
if isinstance(d, dict) and self.method == 'POST':
# if POST response contains a display_id value it is
# considered to be used as replacement for the form
# own identifier; this is used so a unique public
# identifier can be used between w.c.s. and a business
# application.
if isinstance(d.get('data'), dict) and d['data'].get('display_id'):
formdata.id_display = d.get('data', {}).get('display_id')
elif d.get('display_id'):