-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
table.html throws an 'NoneType' object has no attribute '_base_manager' when a plugin is disabled #11335
Comments
Thanks for capturing this. I've run into it a few times during the course of development. It's going to be a bit tricky to solve for I'm afraid, since removing the plugin without clearing out its associated content types leaves the database in an invalid state. #10696 might help with this. |
I understand that with the uninstallation of a plugin, that you want to remove all stale/db data. |
The root issue is that Django (understandably) assumes that any entry in the content types table will map to a valid Python model, and there doesn't appear to be any obvious hook on generic foreign keys for handling the condition where the model does not exist. So it may take some digging to devise a workable solution. |
I'm not sure if this will be accepted as an answer. However, I feel when a plugin is removed it can be assumed the data is no longer needed. So, if Here is diff for the change
The command needed for cleanup of DB along with results
|
I can submit a PR if my comment is accepted as a solution |
I think this was @PieterL75's concern above though. We need a way to let users temporarily disable a plugin without deleting its data. |
So until this is fixed I need to delete all changelog data for the specific plugin in order to be able to view all my changelog, if i would uninstall the plugin? It does not matter if it is permanent or temporary. Maybe this should be linked to the documentation. |
…lled apps (#11709) * Fixes #11335: Default manager for ObjectChange should filter by installed apps * Employ canonical model discovery mechanism * Move filtering logic to valid_models() queryset method * fixed import to avoid content type does not exist * Cleanup --------- Co-authored-by: Abhimanyu Saharan <[email protected]>
NetBox version
v3.3.10
Python version
3.8
Steps to Reproduce
Expected Behavior
Homepage is shown
Observed Behavior
An error is thrown referencing the changelog object of the disabled plugin
I ran again this, when I had to disable a plugin after upgrading to v3.4, as the plugin was not yet compatible.
It would be great if the changelog is not that sensitive to disabled/removed plugins. I see this issue surfaces regularly and on different places where the changelog is shown
The text was updated successfully, but these errors were encountered: