workflows: do not lose form action id in XML export/imports (#50013)
This commit is contained in:
parent
e14acb7d05
commit
e15ff78711
|
@ -267,6 +267,10 @@ def test_display_form_action(pub):
|
|||
# formdef.max_field_id is recalculated when importing a FormWorkflowStatusItem
|
||||
assert wf2.possible_status[0].items[0].formdef.max_field_id == len(display_form.formdef.fields)
|
||||
|
||||
# check action id is not lost when using include_id
|
||||
wf2 = assert_import_export_works(wf, include_id=True)
|
||||
assert wf2.possible_status[0].items[0].id == display_form.id
|
||||
|
||||
|
||||
def test_export_to_model_action(pub):
|
||||
wf = Workflow(name='status')
|
||||
|
|
|
@ -140,7 +140,9 @@ class FormWorkflowStatusItem(WorkflowStatusItem):
|
|||
return item
|
||||
|
||||
def init_with_xml(self, elem, charset, include_id=False, snapshot=False, check_datasources=True):
|
||||
WorkflowStatusItem.init_with_xml(self, elem, charset)
|
||||
super().init_with_xml(elem, charset,
|
||||
include_id=include_id, snapshot=snapshot,
|
||||
check_datasources=check_datasources)
|
||||
el = elem.find('formdef')
|
||||
if el is None:
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue