mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-28 11:26:26 -06:00
11340 cable termination setter (#11341)
* 11340 update _terminations_modified only if modified * 11340 update _terminations_modified only if modified
This commit is contained in:
parent
271fd13641
commit
96d2b4d5ef
@ -119,7 +119,8 @@ class Cable(PrimaryModel):
|
||||
|
||||
@a_terminations.setter
|
||||
def a_terminations(self, value):
|
||||
self._terminations_modified = True
|
||||
if not self.pk or self.a_terminations != list(value):
|
||||
self._terminations_modified = True
|
||||
self._a_terminations = value
|
||||
|
||||
@property
|
||||
@ -133,7 +134,8 @@ class Cable(PrimaryModel):
|
||||
|
||||
@b_terminations.setter
|
||||
def b_terminations(self, value):
|
||||
self._terminations_modified = True
|
||||
if not self.pk or self.b_terminations != list(value):
|
||||
self._terminations_modified = True
|
||||
self._b_terminations = value
|
||||
|
||||
def clean(self):
|
||||
|
Loading…
Reference in New Issue
Block a user