Skip to content

Commit

Permalink
If no result in the first query that is not needed to continue.
Browse files Browse the repository at this point in the history
  • Loading branch information
thefunny42 committed Aug 5, 2016
1 parent 3e9794f commit f241223
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hurry/query/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,12 @@ def __init__(self, *terms):

def apply(self, context=None):
results = []
for term in self.terms:
for index, term in enumerate(self.terms):
r = term.apply(context)
# empty results
if not r:
if not index:
return r
continue
results.append(r)

Expand Down

0 comments on commit f241223

Please sign in to comment.