Fix delete call

This commit is contained in:
Oliver Walters 2026-06-13 11:01:36 +00:00
parent 2ee1016e84
commit 94ae7839b3
1 changed files with 5 additions and 5 deletions

View File

@ -3029,11 +3029,6 @@ class Note(
self.cleanup_images()
def delete(self):
"""Perform custom delete checks before deleting a Parameter instance."""
self.check_delete()
super().delete()
def clean(self):
"""Clean / validate the note before saving to the database."""
if self.content:
@ -3127,6 +3122,11 @@ class Note(
if instance and isinstance(instance, InvenTreeNoteMixin):
instance.check_note_delete(self)
def delete(self, *args, **kwargs):
"""Perform custom delete checks before deleting a Note instance."""
self.check_delete()
super().delete(*args, **kwargs)
def cleanup_images(self):
"""Remove any images which are no longer referenced in the note content."""
for image in self.images.all():