Skip to content
Snippets Groups Projects
Commit bc39a61d authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[libraries][admin] Fixed editing

parent 07be7210
No related branches found
No related tags found
1 merge request!2551.4.x
...@@ -110,7 +110,10 @@ class LibraryModelForm(forms.ModelForm): ...@@ -110,7 +110,10 @@ class LibraryModelForm(forms.ModelForm):
# make sure we don't pass back a str field as 'file' # make sure we don't pass back a str field as 'file'
if 'declaration_file' in self.data and \ if 'declaration_file' in self.data and \
isinstance(self.data['declaration_file'], six.string_types): 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
#---------------------------------------------------------- #----------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment