1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Remove CONNECTION_STATUS_CONNECTED and CONNECTION_STATUS_PLANNED constants

This commit is contained in:
Jeremy Stretch
2020-02-24 14:14:58 -05:00
parent f7b620c6a2
commit 4d1749cc71
3 changed files with 8 additions and 12 deletions

View File

@@ -2118,13 +2118,13 @@ class Cable(ChangeLoggedModel):
# Determine overall path status (connected or planned)
if self.status == CableStatusChoices.STATUS_CONNECTED:
path_status = CONNECTION_STATUS_CONNECTED
path_status = True
for segment in a_path[1:] + b_path[1:]:
if segment[1] is None or segment[1].status != CableStatusChoices.STATUS_CONNECTED:
path_status = CONNECTION_STATUS_PLANNED
path_status = False
break
else:
path_status = CONNECTION_STATUS_PLANNED
path_status = False
a_endpoint = a_path[-1][2]
b_endpoint = b_path[-1][2]