[Bug]: Deleting assigned object doesn't delete secret
alegru opened this issue · 2 comments
NetBox Secrets plugin version
v1.7.6
NetBox version
v3.4.10
Steps to Reproduce
Assign a secret to a device, for example. If you delete the device without deleting the associated secret first, the secret remains.
I didn't try plugin v1.8.X, but I'm assuming it would show the same behavior.
Expected Behavior
Secrets should automatically get deleted with their assigned object, like in the old secrets plugin.
Observed Behavior
The secret cannot be deleted via UI. Trying this returned the following error page:
<class 'AttributeError'>
'NoneType' object has no attribute '_meta'
Python version: 3.10.6
NetBox version: 3.4.10
Same story trying to get this secret via API, resulting in an internal server error.
@alegru This issue has been fixed in v1.8.x. You should try version 1.8.x of Secrets. I'm unable to reproduce the issue.
I since had a chance to upgrade to NetBox v3.5.1, can confirm it's fixed in plugin v1.8.1.
@kprince28 Not every user has a chance to upgrade immediately. Do you think you can backport a fix to v1.7.X? If that's not feasible, feel free to close this issue. Thank you for investigating!