Skip to content

Commit

Permalink
Merge pull request #131 from pbs/replace_file
Browse files Browse the repository at this point in the history
BEN-2623 filer replace file
allow new file to be uploaded to storage if file is changed
  • Loading branch information
mnadasan authored Jan 25, 2023
2 parents 3949511 + 786d530 commit 62f062f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion filer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#-*- coding: utf-8 -*-
# version string following pep-0396 and pep-0386
__version__ = '0.9pbs.110' # pragma: nocover
__version__ = '0.9pbs.111' # pragma: nocover

default_app_config = 'filer.apps.FilerConfig'
2 changes: 1 addition & 1 deletion filer/models/filemodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def save(self, *args, **kwargs):
self.generate_sha1()
except (IOError, TypeError, ValueError) as e:
pass
if filer_settings.FOLDER_AFFECTS_URL and self._is_path_changed():
if filer_settings.FOLDER_AFFECTS_URL and (self._is_path_changed() or (self._old_sha1 != self.sha1)):
self._force_commit = True
self.update_location_on_storage(*args, **kwargs)
else:
Expand Down

0 comments on commit 62f062f

Please sign in to comment.