-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#954 avoid orphaned files when using admin > advanced > replace file #958
Conversation
not a real workaround, looks ok?! slightly better exception handling could be done, but then that's it - I once read one should not just +1 for merging this and wasting less server space ;-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for contributing this, definitely much needed. I only added a minor remark, could you address it?
this = File.objects.get(id=self.id) | ||
if this.file != self.file: | ||
this.file.delete(save=False) | ||
except: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to explicitly handle the expected exceptions
@SachaMPS Thanks for contributing this,, could you rebase on top of current develop? |
how about a merge...1.4 is out :-) |
@benzkji I fully agree with @yakky on #958 (comment) |
sure! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
is this issue resolved? anyone? |
No, this PR was not merged (author did not reply to review) and the ticket is still open. |
someone would need to handle the exception, and off we go, right? |
What are the possible exceptions here. Obviously there's the |
if |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This will now be closed due to inactivity, but feel free to reopen it. |
This is important, isn't it? |
@jrief or was this alreaedy merge before? It's an easy picking... |
This should be a workaround for:
#954