Skip to content

Commit

Permalink
Annotations: prevent infinite loop for annotation cycles
Browse files Browse the repository at this point in the history
  • Loading branch information
aschampion committed Aug 5, 2016
1 parent 6936785 commit db188ef
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions django/applications/catmaid/control/neuron_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,10 @@ def __init__(self):
child_ids = aaa.get(parent_id) or set_wrapper()
for child_id in child_ids.data:
if child_id not in sa_ids:
# Add all children as sub annotations
ls.add(child_id)
working_set.add(child_id)
if child_id not in ls:
# Add all children as sub annotations
ls.add(child_id)
working_set.add(child_id)
# Store the result list for this ID
sa_ids[annotation_set] = list(ls)

Expand Down

0 comments on commit db188ef

Please sign in to comment.