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

Changelog retention time not shown in UI when set to Indefinite #3573

Closed
Grokzen opened this issue Oct 7, 2019 · 0 comments
Closed

Changelog retention time not shown in UI when set to Indefinite #3573

Grokzen opened this issue Oct 7, 2019 · 0 comments
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@Grokzen
Copy link
Contributor

Grokzen commented Oct 7, 2019

Environment

  • Python version: 3.7.x
  • NetBox version: 2.6.5

Steps to Reproduce

  1. Set django setting CHANGELOG_RETENTION = 0 in config
  2. View changelog list page http://localhost/extras/changelog/
  3. Scroll down to bottom

Expected Behavior

Text Changelog retention: Indefinite to be visible/seen

Observed Behavior

No text/div is rendered

Cause

When setting the variable to 0 to indicate Indefinite time, the if check that checks if the div and text should be rendered is done in sucha way that it evaluates to False if the value is 0 and the output is not rendered.

https://github.com/netbox-community/netbox/blob/develop/netbox/templates/extras/objectchange_list.html#L12

Possible solution is to change the if check to this, it is not good/optimal, but it does the job and the text is again rendered as the expected text.

{% if settings.CHANGELOG_RETENTION >= 0 %}

References

#3264
#3368

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application labels Oct 7, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants