Skip to content
Discussion options

You must be logged in to vote

The problem could be solved.

jasonyates/netbox-documents#9

In Models.py

https://github.com/jasonyates/netbox-documents/pull/17/files

def delete(self, *args, **kwargs):

         _name = self.document.name

         # Delete file from disk
         super().delete(*args, **kwargs)
         self.document.delete(save=False)

         # Restore the name of the document as it's re-used in the notifications later
         self.document.name = _name

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by LHBL2003
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant