mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00: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:
@ -119,7 +119,8 @@ class Cable(PrimaryModel):
|
|||||||
|
|
||||||
@a_terminations.setter
|
@a_terminations.setter
|
||||||
def a_terminations(self, value):
|
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
|
self._a_terminations = value
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -133,7 +134,8 @@ class Cable(PrimaryModel):
|
|||||||
|
|
||||||
@b_terminations.setter
|
@b_terminations.setter
|
||||||
def b_terminations(self, value):
|
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
|
self._b_terminations = value
|
||||||
|
|
||||||
def clean(self):
|
def clean(self):
|
||||||
|
Reference in New Issue
Block a user