Skip to content

Commit

Permalink
Updated index insert
Browse files Browse the repository at this point in the history
  • Loading branch information
pkittenis committed Nov 21, 2016
1 parent f90393c commit 8e4d546
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions influxgraph/classes/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,9 @@ def insert(self, paths):
child_name = paths.pop(0)
for (_child_name, node) in self.children:
if child_name == _child_name:
found = True
return node.insert(paths)
if not found:
node = Node(self)
self.children.append((child_name, node))
node = Node(self)
self.children.append((child_name, node))
return node.insert(paths)

def to_array(self):
Expand Down

0 comments on commit 8e4d546

Please sign in to comment.