Fixes #142: Renamed filters module to resolve collision with netbox-branching#143
Open
arcticash wants to merge 1 commit intoDanSheps:mainfrom
Open
Fixes #142: Renamed filters module to resolve collision with netbox-branching#143arcticash wants to merge 1 commit intoDanSheps:mainfrom
arcticash wants to merge 1 commit intoDanSheps:mainfrom
Conversation
netbox_lifecycle_filters.py and updated all {% load filters %}
references
Author
|
Updated the PR description to reflect the actual root cause being netbox-branching plugin and not netbox core as originally suspected |
|
Note - we are renaming this is in branching ; but for completeness, we should do both |
Collaborator
|
Tests failures are not related to this change, otherwise, this looks good to me. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Renamed netbox_lifecycle/templatetags/filters.py to netbox_lifecycle_filters.py and updated all {% load filters %} references.
This PR Fixes issue #142
Root Cause
The plugin's templatetag module
templatetags/filters.pyconflicts with netbox-branching (Thanks to @cruse1977 for the pointer!) as both usedutilities/templatetags/filters.py. The library from netbox-ranching is resolved first during{% load filters %}, meaningdate_badge_classis never found.Changes
netbox_lifecycle/templatetags/filters.pytonetbox_lifecycle/templatetags/netbox_lifecycle_filters.py{% load filters %}to{% load netbox_lifecycle_filters %}in all affected templatestests/test_templatetags.pyTesting
Tested against NetBox 4.5.4 and 4.5.5 with
netbox-lifecycle1.1.8 andnetbox-branching. Device detail pages now load correctly with lifecycle date badges rendering as expected.