Invalidate cache when clearing metadata

This commit is contained in:
tcely 2025-04-23 15:42:02 -04:00 committed by GitHub
parent 33acb5fc26
commit 091b4cdaad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1108,6 +1108,7 @@ class Media(models.Model):
def metadata_clear(self, /, *, save=False):
self.metadata = None
setattr(self, '_cached_metadata_dict', None)
if save:
self.save()