mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Store the front ports on the position_stack so we can provide better feedback to the user
This commit is contained in:
@@ -124,7 +124,7 @@ class CableTermination(models.Model):
|
||||
# many-to-one points so we can select the correct FrontPort when we reach the corresponding
|
||||
# one-to-many point.
|
||||
if peer_port.positions > 1:
|
||||
position_stack.append(termination.rear_port_position)
|
||||
position_stack.append(termination)
|
||||
|
||||
return peer_port
|
||||
|
||||
@@ -135,7 +135,8 @@ class CableTermination(models.Model):
|
||||
if not position_stack:
|
||||
raise CableTraceSplit(termination)
|
||||
|
||||
position = position_stack.pop()
|
||||
front_port = position_stack.pop()
|
||||
position = front_port.rear_port_position
|
||||
|
||||
# Validate the position
|
||||
if position not in range(1, termination.positions + 1):
|
||||
|
Reference in New Issue
Block a user