Skip to content
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

Fixes 18555: Fix model URL generator for plugins #18607

Merged
merged 7 commits into from
Feb 18, 2025

Conversation

alehaa
Copy link
Contributor

@alehaa alehaa commented Feb 8, 2025

Fixes: #18555

The default get_absolute_url() implementation can now return the URL for plugins.

Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues with the fix itself, but I'd like to see if we can find a less disruptive solution for testing.

netbox/netbox/tests/dummy_plugin/models.py Outdated Show resolved Hide resolved
alehaa and others added 5 commits February 15, 2025 18:10
Instead of using a single model for testing, one is used for testing the
plugin API and a dedicated one is used for testing the NetBox plugin
model features.
Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @alehaa! (I renamed the test module to test_models.py just to be consistent with the other apps.)

@jeremystretch jeremystretch merged commit 6c6cb32 into netbox-community:main Feb 18, 2025
3 checks passed
@alehaa alehaa deleted the 18555-model-url branch February 18, 2025 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugins not covered by get_absolute_url()
2 participants