Changelog & tweaks for #5650

This commit is contained in:
Jeremy Stretch
2021-03-25 11:51:02 -04:00
parent a135396d7b
commit bcfc2e5f74
3 changed files with 5 additions and 2 deletions

View File

@@ -490,11 +490,13 @@ class CablePath(models.Model):
cables = Cable.objects.filter(id__in=cable_ids, _abs_length__isnull=False)
total_length = cables.aggregate(total=Sum('_abs_length'))['total']
is_definitive = len(cables) == len(cable_ids)
return (total_length, is_definitive)
return total_length, is_definitive
def get_split_nodes(self):
"""
Return all available next segments in a split cable path.
"""
rearport = path_node_to_object(self.path[-1])
return FrontPort.objects.filter(rear_port=rearport)