1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixed cable creation form

This commit is contained in:
Jeremy Stretch
2018-10-23 13:40:10 -04:00
parent 471bddea09
commit ea0de629df
3 changed files with 10 additions and 24 deletions

View File

@@ -2355,8 +2355,7 @@ class CableForm(BootstrapMixin, ChainedFieldsMixin, forms.ModelForm):
attrs={'filter-for': 'endpoint_b_id'}
)
)
endpoint_b_id = forms.ChoiceField(
choices=[],
endpoint_b_id = forms.IntegerField(
label='Name',
widget=APISelect(
api_url='/api/dcim/{{endpoint_b_type}}s/?device_id={{endpoint_b_device}}',
@@ -2380,14 +2379,6 @@ class CableForm(BootstrapMixin, ChainedFieldsMixin, forms.ModelForm):
model__in=COMPATIBLE_ENDPOINT_TYPES.get(endpoint_a_type)
)
def clean(self):
# Assign endpoint B
cleaned_data = super(CableForm, self).clean()
#
# Device bays