workflows: allow Django formatted recepient in sendmail action (#19442)
This commit is contained in:
parent
3906f827cd
commit
7809060474
|
@ -472,7 +472,7 @@ def test_sendmail_other_destination(pub):
|
|||
wf2 = assert_import_export_works(wf)
|
||||
assert Role.count() == 0
|
||||
|
||||
sendmail.to = ['_submitter', '=form_var_plop', '[form_var_plop]', 'foobar@localhost']
|
||||
sendmail.to = ['_submitter', '=form_var_plop', '[form_var_plop]', '{{ form_var_plop }}', 'foobar@localhost']
|
||||
wf2 = assert_import_export_works(wf)
|
||||
assert Role.count() == 0
|
||||
assert wf2.possible_status[0].items[0].to == sendmail.to
|
||||
|
|
|
@ -2044,7 +2044,7 @@ class SendmailWorkflowStatusItem(WorkflowStatusItem):
|
|||
return None
|
||||
value = elem.text.encode(charset)
|
||||
|
||||
if value.startswith('=') or '@' in value or '[' in value:
|
||||
if value.startswith('=') or '@' in value or Template.is_template_string(value):
|
||||
return value
|
||||
|
||||
return super(SendmailWorkflowStatusItem, self)._get_role_id_from_xml(
|
||||
|
|
Loading…
Reference in New Issue