mirror of
https://github.com/inventree/InvenTree.git
synced 2026-09-01 09:41:22 +00:00
Fix delete call
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user