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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user