Skip to content

Commit

Permalink
fix slicing error
Browse files Browse the repository at this point in the history
  • Loading branch information
strohne committed Jun 3, 2018
1 parent c98b369 commit 91fb774
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/datatree.py
Expand Up @@ -208,14 +208,18 @@ def appendNodes(self, data, options, headers=None, delaycommit=False):
return False

#filter response
if options['nodedata'] is not None:
if options['nodedata'] is None:
subkey = 0
nodes = data
offcut = None
elif hasDictValue(data,options['nodedata']):
subkey = options['nodedata'].rsplit('.', 1)[0]
nodes = getDictValue(data, options['nodedata'], False)
offcut = filterDictValue(data, options['nodedata'], False)
else:
subkey = 0
nodes = data
offcut = None
subkey = options['nodedata'].rsplit('.', 1)[0]
nodes = []
offcut = data

if not (type(nodes) is list):
nodes = [nodes]
Expand Down

0 comments on commit 91fb774

Please sign in to comment.