Skip to content

Commit

Permalink
Merge pull request #494 from erans/master
Browse files Browse the repository at this point in the history
MongoDB query runner: cleanup
  • Loading branch information
arikfr committed Jul 15, 2015
2 parents 7702b05 + c919602 commit 4f11f28
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions redash/query_runner/mongodb.py
Expand Up @@ -185,12 +185,11 @@ def run_query(self, query):
else:
collection = query_data["collection"]

q = None
q = query_data.get("query", None)
f = None

aggregate = None
if "aggregate" in query_data:
aggregate = query_data["aggregate"]
aggregate = query_data.get("aggregate", None)
if aggregate:
for step in aggregate:
if "$sort" in step:
sort_list = []
Expand All @@ -199,9 +198,7 @@ def run_query(self, query):

step["$sort"] = SON(sort_list)

if aggregate:
pass
else:
if not aggregate:
s = None
if "sort" in query_data and query_data["sort"]:
s = []
Expand Down

0 comments on commit 4f11f28

Please sign in to comment.