misc: add backward-compatibility support for role id as integer (#57131)
This commit is contained in:
parent
73630363dc
commit
6b310b6ec4
|
@ -287,9 +287,10 @@ class FormDefUI:
|
|||
if filled.workflow_roles:
|
||||
workflow_roles.update(filled.workflow_roles)
|
||||
for function_key, function_value in workflow_roles.items():
|
||||
if isinstance(function_value, str):
|
||||
if isinstance(function_value, (str, int)):
|
||||
# single role, defined at formdef level
|
||||
function_values = {function_value}
|
||||
# (int are for compatibility with very old forms)
|
||||
function_values = {str(function_value)}
|
||||
else:
|
||||
# list of roles (or none), defined at formdata level
|
||||
function_values = set(function_value or [])
|
||||
|
|
Loading…
Reference in New Issue