Explorar o código

fix(wireless): Correct validation error field reference

Fixes the reference from `interface_a` to `interface_b` in the
validation error message for WirelessLink. Ensures the correct field is
indicated during validation errors.
Martin Hauser hai 8 meses
pai
achega
2680f855ff
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      netbox/wireless/models.py

+ 1 - 1
netbox/wireless/models.py

@@ -206,7 +206,7 @@ class WirelessLink(WirelessAuthenticationBase, DistanceMixin, PrimaryModel):
             })
             })
         if self.interface_b.type not in WIRELESS_IFACE_TYPES:
         if self.interface_b.type not in WIRELESS_IFACE_TYPES:
             raise ValidationError({
             raise ValidationError({
-                'interface_a': _(
+                'interface_b': _(
                     "{type} is not a wireless interface."
                     "{type} is not a wireless interface."
                 ).format(type=self.interface_b.get_type_display())
                 ).format(type=self.interface_b.get_type_display())
             })
             })