mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-09 01:49:35 -06:00
Fixes #20217: Fix '0 VLANs available' in the VLANs table in VLAN Groups (#20261)
Some checks are pending
CI / build (20.x, 3.10) (push) Waiting to run
CI / build (20.x, 3.11) (push) Waiting to run
CI / build (20.x, 3.12) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, actions) (push) Waiting to run
Some checks are pending
CI / build (20.x, 3.10) (push) Waiting to run
CI / build (20.x, 3.11) (push) Waiting to run
CI / build (20.x, 3.12) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, python) (push) Waiting to run
CodeQL / Analyze (${{ matrix.language }}) (none, actions) (push) Waiting to run
* Fixes #20217: hide 0 VLANs available message in VLAN groups * Simplified fix to improve readability
This commit is contained in:
parent
873372f61e
commit
1034f738af
@ -164,7 +164,7 @@ def available_vlans_from_range(vlans, vlan_group, vid_range):
|
||||
prev_vid = vlan.vid
|
||||
|
||||
# Annotate any remaining available VLANs
|
||||
if prev_vid < max_vid:
|
||||
if prev_vid < max_vid - 1:
|
||||
new_vlans.append({
|
||||
'vid': prev_vid + 1,
|
||||
'vlan_group': vlan_group,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user