Skip to content

Commit

Permalink
fix(drivers): improve the fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nan-wang committed Aug 13, 2020
1 parent 666d6d0 commit 09a7ff1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jina/drivers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ def pre_traverse(_docs, traverse_on, context_doc=None):

for d in _docs:
# check if apply on the current level
if self.is_apply and d.level_depth >= self._depth_start:
if self.is_apply and self._depth_start <= d.level_depth < self._depth_end:
self._apply(d, context_doc, traverse_on, *args, **kwargs)
# check if apply to the next level
if (d.level_depth + 1) < self._depth_end:
if d.level_depth < self._depth_end:
pre_traverse(getattr(d, traverse_on), traverse_on, d)

if self.recursion_order == 'post':
Expand Down

0 comments on commit 09a7ff1

Please sign in to comment.