Verify that workflow_options is not None before indexing it

This commit is contained in:
Benjamin Dauvergne 2011-06-21 20:07:07 +00:00
parent cdaa71280c
commit 7aa219091e
1 changed files with 2 additions and 1 deletions

View File

@ -833,7 +833,8 @@ class ExportToModel(WorkflowStatusItem):
'the [variable] syntax, available variables depends on the form.')
filename = 'export_to_model-%s-%s-%s.upload' % ids
widget_name = '%smodel_file' % prefix
if formdef and formdef.workflow_options.get(widget_name) is not None:
if formdef and formdef.workflow_options and \
formdef.workflow_options.get(widget_name) is not None:
value = formdef.workflow_options.get(widget_name)
else:
value = self.model_file