Browse Source

Order interfaces naturally for Device A

Jeremy Stretch 8 years ago
parent
commit
e8fd0f3531
1 changed files with 1 additions and 1 deletions
  1. 1 1
      netbox/dcim/forms.py

+ 1 - 1
netbox/dcim/forms.py

@@ -1481,7 +1481,7 @@ class InterfaceConnectionForm(BootstrapMixin, forms.ModelForm):
         super(InterfaceConnectionForm, self).__init__(*args, **kwargs)
         super(InterfaceConnectionForm, self).__init__(*args, **kwargs)
 
 
         # Initialize interface A choices
         # Initialize interface A choices
-        device_a_interfaces = Interface.objects.filter(device=device_a).exclude(
+        device_a_interfaces = Interface.objects.order_naturally().filter(device=device_a).exclude(
             form_factor__in=VIRTUAL_IFACE_TYPES
             form_factor__in=VIRTUAL_IFACE_TYPES
         ).select_related(
         ).select_related(
             'circuit_termination', 'connected_as_a', 'connected_as_b'
             'circuit_termination', 'connected_as_a', 'connected_as_b'