diff --git a/opentech/apply/funds/models.py b/opentech/apply/funds/models.py index 0667648e03357fd02ace58054997ce7e525a9e8f..d607fcfd4982a60762d45d2863aff6aafaf64f36 100644 --- a/opentech/apply/funds/models.py +++ b/opentech/apply/funds/models.py @@ -580,7 +580,7 @@ class ApplicationSubmission(WorkflowHelpers, BaseStreamForm, AbstractFormSubmiss for field in self.form_fields: if isinstance(field.block, UploadableMediaBlock): - file = self.form_data[field.id] + file = self.form_data.get(field.id, {}) self.form_data[field.id] = self.handle_files(file) if not self.id: diff --git a/opentech/apply/funds/views.py b/opentech/apply/funds/views.py index 6e6d0661b74ccc48ef49496bef06533b85e77c1e..205f6d0e71137ff9e2061d254d9a5c67220285ed 100644 --- a/opentech/apply/funds/views.py +++ b/opentech/apply/funds/views.py @@ -158,9 +158,9 @@ class SubmissionEditView(UpdateView): instance = kwargs.pop('instance') form_data = instance.form_data - # convert certain data to the correct field id for field in self.object.form_fields: if isinstance(field.block, MustIncludeFieldBlock): + # convert certain data to the correct field id try: response = form_data[field.block.name] except KeyError: