mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-17 12:42:52 -06:00
Fix terminations assignment
This commit is contained in:
parent
83fdab5feb
commit
ecee7421ea
@ -92,8 +92,6 @@ class Cable(NetBoxModel):
|
||||
null=True
|
||||
)
|
||||
|
||||
terminations = []
|
||||
|
||||
class Meta:
|
||||
ordering = ('pk',)
|
||||
|
||||
@ -112,7 +110,9 @@ class Cable(NetBoxModel):
|
||||
assert self.pk is None
|
||||
for t in terminations:
|
||||
t.cable = self
|
||||
self.terminations.append(t)
|
||||
self.terminations = terminations
|
||||
else:
|
||||
self.terminations = []
|
||||
|
||||
@classmethod
|
||||
def from_db(cls, db, field_names, values):
|
||||
|
Loading…
Reference in New Issue
Block a user