Show proper name for bookmark assets in admin (#708)

This commit is contained in:
ab623
2024-04-17 22:18:23 +01:00
committed by GitHub
parent 9dc3521d5e
commit 0586983602
2 changed files with 9 additions and 2 deletions

View File

@@ -118,6 +118,9 @@ class BookmarkAsset(models.Model):
pass
super().save(*args, **kwargs)
def __str__(self):
return self.display_name or f"Bookmark Asset #{self.pk}"
@receiver(post_delete, sender=BookmarkAsset)
def bookmark_asset_deleted(sender, instance, **kwargs):