workflows: don't crash using existing file attachment actions (#47174)
This commit is contained in:
parent
73b138dc64
commit
7eef27ddf5
|
@ -114,7 +114,7 @@ class AddAttachmentWorkflowStatusItem(WorkflowStatusItem):
|
|||
title = self.title or _('Upload File')
|
||||
else:
|
||||
title = None
|
||||
file_type = self.document_type.get('mimetypes')
|
||||
file_type = (self.document_type or {}).get('mimetypes')
|
||||
form.add(FileWithPreviewWidget, 'attachment%s' % self.id, title=title,
|
||||
required=self.required, hint=self.hint, file_type=file_type,
|
||||
max_file_size=self.max_file_size)
|
||||
|
|
Loading…
Reference in New Issue