Skip to content

Commit

Permalink
#9047 - Fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DanSheps committed Mar 28, 2023
1 parent c4e031e commit 8f3590f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
16 changes: 3 additions & 13 deletions netbox/circuits/forms/model_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,22 +127,12 @@ class Meta:


class CircuitTerminationForm(NetBoxModelForm):
provider_account = DynamicModelChoiceField(
queryset=ProviderAccount.objects.all(),
required=False,
initial_params={
'circuits': '$circuit'
},
query_params={
'provider': '$provider',
},
selector=True
)
circuit = DynamicModelChoiceField(
queryset=Circuit.objects.all(),
query_params={
'provider_id': '$provider',
},
selector=True
)
site = DynamicModelChoiceField(
queryset=Site.objects.all(),
Expand All @@ -158,8 +148,8 @@ class CircuitTerminationForm(NetBoxModelForm):
class Meta:
model = CircuitTermination
fields = [
'provider_account', 'circuit', 'term_side', 'site', 'provider_network', 'mark_connected',
'port_speed', 'upstream_speed', 'xconnect_id', 'pp_info', 'description', 'tags',
'circuit', 'term_side', 'site', 'provider_network', 'mark_connected', 'port_speed', 'upstream_speed',
'xconnect_id', 'pp_info', 'description', 'tags',
]
widgets = {
'port_speed': SelectSpeedWidget(),
Expand Down
2 changes: 1 addition & 1 deletion netbox/dcim/tests/test_cablepaths.py
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,7 @@ def test_216_interface_to_interface_via_multiple_circuits(self):
"""
interface1 = Interface.objects.create(device=self.device, name='Interface 1')
interface2 = Interface.objects.create(device=self.device, name='Interface 2')
circuit2 = Circuit.objects.create(provider_account=self.circuit.provider_account, type=self.circuit.type, cid='Circuit 2')
circuit2 = Circuit.objects.create(provider=self.circuit.provider, provider_account=self.circuit.provider_account, type=self.circuit.type, cid='Circuit 2')
circuittermination1 = CircuitTermination.objects.create(circuit=self.circuit, site=self.site, term_side='A')
circuittermination2 = CircuitTermination.objects.create(circuit=self.circuit, site=self.site, term_side='Z')
circuittermination3 = CircuitTermination.objects.create(circuit=circuit2, site=self.site, term_side='A')
Expand Down
2 changes: 0 additions & 2 deletions netbox/templates/circuits/circuittermination_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
<div class="row mb-2">
<h5 class="offset-sm-3">Circuit Termination</h5>
</div>
{% render_field form.provider %}
{% render_field form.provider_account %}
{% render_field form.circuit %}
{% render_field form.term_side %}
{% render_field form.tags %}
Expand Down

0 comments on commit 8f3590f

Please sign in to comment.