mirror of
https://github.com/jazzband/django-avatar.git
synced 2026-03-16 22:20:30 +00:00
fixed storage deletion bug
This commit is contained in:
parent
182e7aa641
commit
15879af5ce
1 changed files with 2 additions and 1 deletions
|
|
@ -210,7 +210,8 @@ def remove_avatar_images(instance=None, **kwargs):
|
|||
for size in settings.AVATAR_AUTO_GENERATE_SIZES:
|
||||
if instance.thumbnail_exists(size):
|
||||
instance.avatar.storage.delete(instance.avatar_name(size))
|
||||
instance.avatar.storage.delete(instance.avatar.name)
|
||||
if instance.avatar.storage.exists(instance.avatar.name):
|
||||
instance.avatar.storage.delete(instance.avatar.name)
|
||||
|
||||
|
||||
signals.post_save.connect(create_default_thumbnails, sender=Avatar)
|
||||
|
|
|
|||
Loading…
Reference in a new issue