mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-28 11:26:26 -06:00
Iterate through a freshly queried set of CableTerminations to find endpoints in update_connected_endpoints
This commit is contained in:
parent
8c07978042
commit
b6265d8285
@ -85,7 +85,8 @@ def update_connected_endpoints(instance, created, raw=False, **kwargs):
|
||||
if instance._terminations_modified:
|
||||
a_terminations = []
|
||||
b_terminations = []
|
||||
for t in instance.terminations.all():
|
||||
# Note: instance.terminations.all() is not safe to use here as it might be stale
|
||||
for t in CableTermination.objects.filter(cable=instance):
|
||||
if t.cable_end == CableEndChoices.SIDE_A:
|
||||
a_terminations.append(t.termination)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user