Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

Commit

Permalink
closes #41
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrasca committed Apr 4, 2015
1 parent 3531cf8 commit 57cd668
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bauble/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,12 @@ def invoke(self, search_strategy):

query = search_strategy._session.query(cls)

result = set()

# select all objects from the domain
if self.values == '*':
search_strategy._results.update(query.all())
return
result.update(query.all())
return result

mapper = class_mapper(cls)

Expand All @@ -305,7 +307,6 @@ def invoke(self, search_strategy):
condition = lambda col: \
lambda val: mapper.c[col].op(self.cond)(val)

result = set()
for col in properties:
ors = or_(*map(condition(col), self.values.express()))
result.update(query.filter(ors).all())
Expand Down

0 comments on commit 57cd668

Please sign in to comment.