mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Changelog and cleanup for #9935
This commit is contained in:
@@ -128,20 +128,26 @@ class WirelessLAN(WirelessAuthenticationBase, NetBoxModel):
|
||||
return reverse('wireless:wirelesslan', args=[self.pk])
|
||||
|
||||
|
||||
def get_wireless_interface_types():
|
||||
# Wrap choices in a callable to avoid generating dummy migrations
|
||||
# when the choices are updated.
|
||||
return {'type__in': WIRELESS_IFACE_TYPES}
|
||||
|
||||
|
||||
class WirelessLink(WirelessAuthenticationBase, NetBoxModel):
|
||||
"""
|
||||
A point-to-point connection between two wireless Interfaces.
|
||||
"""
|
||||
interface_a = models.ForeignKey(
|
||||
to='dcim.Interface',
|
||||
limit_choices_to={'type__in': WIRELESS_IFACE_TYPES},
|
||||
limit_choices_to=get_wireless_interface_types,
|
||||
on_delete=models.PROTECT,
|
||||
related_name='+',
|
||||
verbose_name="Interface A",
|
||||
)
|
||||
interface_b = models.ForeignKey(
|
||||
to='dcim.Interface',
|
||||
limit_choices_to={'type__in': WIRELESS_IFACE_TYPES},
|
||||
limit_choices_to=get_wireless_interface_types,
|
||||
on_delete=models.PROTECT,
|
||||
related_name='+',
|
||||
verbose_name="Interface B",
|
||||
|
Reference in New Issue
Block a user