fix: client credentials model and migrations #137
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #136
This pull request updates the Diode NetBox plugin to support newer NetBox versions and improves compatibility, dependency management, and data handling. The most important changes include updating the base NetBox version, adding a new migration for the
ClientCredentialsmodel, enhancing the data preparation logic for relation fields, and updating dependencies.NetBox version and Docker updates:
Dockerfile-diode-netbox-pluginanddocker-compose.yamlfromv4.3.3-3.3.0tov4.4.2-3.4.1to ensure compatibility with newer NetBox releases. [1] [2]1.4.1) to the compatibility table inREADME.md.Database and model improvements:
0006_clientcredentials_alter_setting_diode_target.py) to create theClientCredentialsmodel (unmanaged, for permissions/saved filters) and altered theSetting.diode_targetfield to use a validator.UnmanagedModelManagerfor unmanaged models likeClientCredentials, preventing accidental database queries.Dependency updates:
netboxlabs-netbox-branchingdependency from0.6.0to0.7.1inrequirements-diode-netbox-plugin.txt.Data handling improvements:
_prepare_datainapi/matcher.pyto handle both single and multiple related object types (ForeignKey and ManyToMany fields) by converting lists of objects to content type IDs.