mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
Fix CableForm Validation for #9102
This commit is contained in:
parent
68b87dd668
commit
58b191b439
@ -160,12 +160,11 @@ def get_cable_form(a_type, b_type):
|
||||
self.initial['a_terminations'] = self.instance.a_terminations
|
||||
self.initial['b_terminations'] = self.instance.b_terminations
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
def clean(self):
|
||||
super().clean()
|
||||
|
||||
# Set the A/B terminations on the Cable instance
|
||||
self.instance.a_terminations = self.cleaned_data['a_terminations']
|
||||
self.instance.b_terminations = self.cleaned_data['b_terminations']
|
||||
|
||||
return super().save(*args, **kwargs)
|
||||
|
||||
return _CableForm
|
||||
|
Loading…
Reference in New Issue
Block a user