mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-20 02:06:42 -06:00
Merge pull request #9752 from mzbroch/mzb-9102#2
Fixes #9730 - Fix CableForm Validation for #9102
This commit is contained in:
commit
4bdef80554
@ -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