diff --git a/beat/web/dataformats/admin.py b/beat/web/dataformats/admin.py index 0a4487983d2f449d80fb90f2a6b4dd4f45aa6f74..9fbf1d4c10127b348b49fa03ca6ea871220706a6 100644 --- a/beat/web/dataformats/admin.py +++ b/beat/web/dataformats/admin.py @@ -123,7 +123,10 @@ class DataFormatModelForm(forms.ModelForm): if 'declaration_file' in self.data and \ isinstance(self.data['declaration_file'], six.string_types): - self.data['declaration_file'] = ContentFile(self.data['declaration_file'], name='unsaved') + mutable_data = self.data.copy() + mutable_data['declaration_file'] = ContentFile(self.data['declaration_file'], name='unsaved') + self.data = mutable_data + #----------------------------------------------------------