fix: use the storage as the source of truth

This commit is contained in:
tcely
2026-09-23 15:39:23 -04:00
committed by GitHub
parent acc94d1eb2
commit 4d37bc9c83

View File

@@ -260,7 +260,7 @@ def media_post_save(sender, instance, created, **kwargs):
@receiver(pre_delete, sender=Media)
def media_pre_delete(sender, instance, **kwargs):
# Remove thumbnail file for deleted media
if instance.thumb:
if instance.thumb_file_exists:
instance.thumb.delete(save=False)
# Save the metadata site & thumbnail URL to the metadata column
existing_metadata = instance.loaded_metadata