Removed 'the mother of all debugging' again. :D
This commit is contained in:
@@ -95,7 +95,6 @@ def auto_delete_file_on_change(sender, instance, **kwargs):
|
||||
old_file = Explorer.objects.get(pk=instance.pk).profile_image
|
||||
except Explorer.DoesNotExist:
|
||||
return False
|
||||
print("Deleting:", old_file)
|
||||
new_file = instance.profile_image
|
||||
if not old_file == new_file:
|
||||
old_file.delete(save=False)
|
||||
|
Reference in New Issue
Block a user