Skip to content

Commit

Permalink
fix(context): Handle cycles in move_edges (#108)
Browse files Browse the repository at this point in the history
Common UUID was detected as the target and source itself. This commit fixes it by just removing this UUID from both sets.
  • Loading branch information
ewuerger authored Jun 18, 2024
1 parent 6c09826 commit 03d8285
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions capellambse_context_diagrams/collectors/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ def move_edges(
for c in connections:
source_owner_uuids = get_all_owners(c.source)
target_owner_uuids = get_all_owners(c.target)
if c.source == c.target:
source_owner_uuids.remove(c.source.uuid)
target_owner_uuids.remove(c.source.uuid)

common_owner_uuid = None
for owner in source_owner_uuids:
if owner in target_owner_uuids:
Expand Down

0 comments on commit 03d8285

Please sign in to comment.