guibrowse: fixes mockmodel error on new anki versions (#288)
Anki deprecated access to the model from the API and the new MockModel contained no attribute 'cards' leading to an error message being thrown instead of card ids being returned. This change uses findCards to find card ids instead of the model so no error is thrown while keeping guiBrowse functionally equivalent to the previous version. Closes #277.
This commit is contained in:
parent
ea35fe549a
commit
5bb02e7d21
@ -1348,7 +1348,7 @@ class AnkiConnect:
|
||||
else:
|
||||
browser.onSearchActivated()
|
||||
|
||||
return list(map(int, browser.model.cards))
|
||||
return self.findCards(query)
|
||||
|
||||
|
||||
@util.api()
|
||||
|
Loading…
Reference in New Issue
Block a user