Skip to content

Conversation

@sleepinggenius2
Copy link
Contributor

Fixes: #13950

Adds a function to the CustomField model to get the choice label for a given value, defaulting to the passed value if one cannot be found. Updates the customfield_value template tag to leverage the new function, as I could not find a way to call a function with an argument in the template without registering a new tag anyway. Updates the render function of the CustomFieldColumn class to leverage the new function, so that table columns are rendered properly. Please let me know if there is anywhere else in the UI where custom field values are rendered that I might have missed.

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.

@jeremystretch jeremystretch merged commit 2851875 into netbox-community:develop Oct 5, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 5, 2023
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.

Render Custom Field Choices as label instead of value in UI

2 participants