Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Also keep find options around when explaining the query in mongodb, t…

…his solves issue with queries always reporting indexOnly=false
  • Loading branch information...
commit b3607a8e97e4105773303e752bd0693c0c252539 1 parent f6bfd5f
@amol- amol- authored
View
4 tgext/debugbar/controller.py
@@ -83,7 +83,9 @@ def perform_ming(self, collection, command, params, duration, modify=None):
for i, step in enumerate(command.split('.')):
if step == 'find':
args = query_params[i]
- cursor = session.find(collection, args)
+ query = args[0]
+ options = args[1]
+ cursor = session.find(collection, query, **options)
else:
args = query_params[i]
cmd = getattr(cursor, step)
View
2  tgext/debugbar/sections/mingorm.py
@@ -35,7 +35,7 @@ def cursor_created(self, cursor, action, *args, **kw):
cursor.tgdb_class = inspect.isclass(
args[0]) and args[0].__name__ or args[0]
try:
- cursor.tgdb_args = [args[1]]
+ cursor.tgdb_args = [[args[1], kw]]
except:
cursor.tgdb_args = [{}]
elif action in ('limit', 'sort', 'skip', 'hint'):
Please sign in to comment.
Something went wrong with that request. Please try again.