Skip to content

WirelessLink model validation references wrong field #19665

@pheus

Description

@pheus

Deployment Type

Self-hosted

NetBox Version

v4.3.2

Python Version

3.11

Steps to Reproduce

  1. Create two wireless-capable interfaces on two different devices (e.g., type = "802.11be").
  2. Create one valid WirelessLink using those interfaces — this should succeed.
  3. Attempt to create a WirelessLink using an invalid (non-wireless) interface for interface_b, while keeping interface_a valid.
  4. Submit the form or API request.

Expected Behavior

A ValidationError should be raised indicating that interface_b is not a valid wireless interface.

The error should appear on the interface_b field as:

interface_b: "<type> is not a wireless interface."

Observed Behavior

Instead, the ValidationError appears on the interface_a field even though it is interface_b that is invalid.

if self.interface_b.type not in WIRELESS_IFACE_TYPES:
raise ValidationError({
'interface_a': _(
"{type} is not a wireless interface."
).format(type=self.interface_b.get_type_display())
})

This creates confusion because the message doesn't correspond to the actual invalid field.

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions