toggle_available show condition is not correct #8194

Closed
opened 2025-12-29 20:33:41 +01:00 by adam · 4 comments
Owner

Originally created by @miyuk on GitHub (Jun 13, 2023).

NetBox version

v3.5.3

Python version

3.8

Steps to Reproduce

N/A

Expected Behavior

This code was inserted by this PR

When current if statement, below pattern doesn't show toggle.

show_assigned = 0 # if 0 => False
show_available = None # if None is not None => False 

I don't know mean this if statement.
I guess to fix as below code.

{% if show_assigned is not None or show_available is not None %}

Thanks

Observed Behavior

N/A

Originally created by @miyuk on GitHub (Jun 13, 2023). ### NetBox version v3.5.3 ### Python version 3.8 ### Steps to Reproduce N/A ### Expected Behavior This code was inserted by [this PR](https://github.com/netbox-community/netbox/commit/dcfd332cbfb2817b91ec744933291a718b3ebbdd#diff-3028b3070117917182aa0bc725bdfe53fb81475a51764ff738b9c06bbe6c582bR3) When current if statement, below pattern doesn't show toggle. ```python show_assigned = 0 # if 0 => False show_available = None # if None is not None => False ``` I don't know mean this if statement. I guess to fix as below code. ```html {% if show_assigned is not None or show_available is not None %} ``` Thanks ### Observed Behavior N/A
adam added the type: bugstatus: revisions needed labels 2025-12-29 20:33:41 +01:00
adam closed this issue 2025-12-29 20:33:42 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jun 13, 2023):

Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken. Also be sure that your report does not reference data on the public NetBox demo, as that is subject to change at any time by an outside party and cannot be relied upon for bug reports.

@jeremystretch commented on GitHub (Jun 13, 2023): Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken. Also be sure that your report does not reference data on the public NetBox demo, as that is subject to change at any time by an outside party and cannot be relied upon for bug reports.
Author
Owner

@miyuk commented on GitHub (Jun 13, 2023):

@jeremystretch
Thank you for your reply.

Unfortunately, this bug cannnot reproduce because only source code problem.

@miyuk commented on GitHub (Jun 13, 2023): @jeremystretch Thank you for your reply. Unfortunately, this bug cannnot reproduce because only source code problem.
Author
Owner

@jeremystretch commented on GitHub (Jun 14, 2023):

In its current form, your report is not actionable. Please provide all information requested in the bug report template. Otherwise, it will be closed.

@jeremystretch commented on GitHub (Jun 14, 2023): In its current form, your report is not actionable. Please provide all information requested in the bug report template. Otherwise, it will be closed.
Author
Owner

@miyuk commented on GitHub (Jun 18, 2023):

@jeremystretch
Excuse me, this bug cannot reproduce in production because it is potential bug.
So, please close this issue.

I only tell you about below souce code is not good as python.

show_assigned or show_available is not None

https://github.com/netbox-community/netbox/blob/develop/netbox/templates/ipam/inc/toggle_available.html#L3

@miyuk commented on GitHub (Jun 18, 2023): @jeremystretch Excuse me, this bug cannot reproduce in production because it is potential bug. So, please close this issue. I only tell you about below souce code is not good as python. ```python show_assigned or show_available is not None ``` https://github.com/netbox-community/netbox/blob/develop/netbox/templates/ipam/inc/toggle_available.html#L3
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8194