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

* Fixes #20217: hide 0 VLANs available message in VLAN groups

* Simplified fix to improve readability
This commit is contained in:
Aaron 2025-09-09 15:33:11 -04:00 committed by GitHub
parent 873372f61e
commit 1034f738af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,