Skip to content

Fixes 18555: Fix model URL generator for plugins#18607

Merged
jeremystretch merged 7 commits intonetbox-community:mainfrom
alehaa:18555-model-url
Feb 18, 2025
Merged

Fixes 18555: Fix model URL generator for plugins#18607
jeremystretch merged 7 commits intonetbox-community:mainfrom
alehaa:18555-model-url

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.

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
bctiemann pushed a commit that referenced this pull request Mar 6, 2025
* Fix model URL generator for plugins

* Fix reverse accessor warning

* Revert "Fix reverse accessor warning"

This reverts commit f07642b.

* Add URL test case for regular models

* Split dummy models

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.

* Fix filterset test case error

* Rename test module

---------

Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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