Allow passing order into 'find_cards'.

This commit is contained in:
David Snopek 2013-07-26 19:16:26 +01:00
parent 0798415076
commit b97f34d741

View File

@ -387,7 +387,8 @@ class CollectionHandler(RestHandlerBase):
def find_cards(self, col, req):
query = req.data.get('query', '')
ids = col.findCards(query)
order = req.data.get('order', False)
ids = anki.find.Finder(col).findCards(query, order)
if req.data.get('preload', False):
cards = [CardHandler._serialize(col.getCard(id), req.data) for id in ids]