mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-15 13:39:54 +02:00
chore(ruff): Enable RET rules and add explicit fallbacks
Adopt Ruff `RET` to improve return-flow consistency across the codebase. Simplify control flow by removing redundant `else` blocks after `return`, and add explicit `return None` (or equivalent) fallbacks where appropriate to preserve existing behavior. Fixes #21411
This commit is contained in:
committed by
Jeremy Stretch
parent
b22e490847
commit
ef52ac4203
@@ -1598,7 +1598,7 @@ class InterfaceBulkEditForm(
|
||||
if not self.cleaned_data['mode']:
|
||||
if self.cleaned_data['untagged_vlan']:
|
||||
raise forms.ValidationError({'untagged_vlan': _("Interface mode must be specified to assign VLANs")})
|
||||
elif self.cleaned_data['tagged_vlans']:
|
||||
if self.cleaned_data['tagged_vlans']:
|
||||
raise forms.ValidationError({'tagged_vlans': _("Interface mode must be specified to assign VLANs")})
|
||||
|
||||
# Untagged interfaces cannot be assigned tagged VLANs
|
||||
|
||||
Reference in New Issue
Block a user