mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-23 03:58:45 -06:00
20465 fix script re-upload
This commit is contained in:
@@ -79,8 +79,8 @@ class ScriptFileForm(ManagedFileForm):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
# Save the new file and capture the actual filename
|
# Save the new file and capture the actual filename
|
||||||
actual_filename = storage.save(filename, data)
|
self.instance.file_path = filename
|
||||||
self.instance.file_path = actual_filename
|
storage.save(filename, data)
|
||||||
|
|
||||||
# need to skip ManagedFileForm save method
|
# need to skip ManagedFileForm save method
|
||||||
return super(ManagedFileForm, self).save(*args, **kwargs)
|
return super(ManagedFileForm, self).save(*args, **kwargs)
|
||||||
|
|||||||
Reference in New Issue
Block a user