From e407a3c8af20d5e5df199104d72cca30a37e2c14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 18 Apr 2021 09:21:10 +0200 Subject: [PATCH] workflows: don't fail on unconfigured export to model action (#34365) --- wcs/wf/export_to_model.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wcs/wf/export_to_model.py b/wcs/wf/export_to_model.py index 99e33315a..fa3d5ce6e 100644 --- a/wcs/wf/export_to_model.py +++ b/wcs/wf/export_to_model.py @@ -484,7 +484,6 @@ class ExportToModel(WorkflowStatusItem): directory_name = property(get_directory_name) def apply_template_to_formdata(self, formdata): - assert self.model_file kind = self.model_file_validation(self.model_file) if kind == 'rtf': outstream = self.apply_rtf_template_to_formdata(formdata) @@ -733,6 +732,8 @@ class ExportToModel(WorkflowStatusItem): self.perform_real(formdata, formdata.evolution[-1]) def perform_real(self, formdata, evo): + if not self.model_file: + return outstream = self.apply_template_to_formdata(formdata) filename = self.get_filename() content_type = self.model_file.content_type