Skip to content

Commit

Permalink
Replace usage of QueryOp with AddonQueryOp
Browse files Browse the repository at this point in the history
  • Loading branch information
RisingOrange committed Nov 8, 2023
1 parent 64f33f3 commit 4e5526a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ankihub/gui/operations/deck_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import aqt
from aqt import QCheckBox, QMessageBox
from aqt.operations import QueryOp
from aqt.studydeck import StudyDeck
from aqt.utils import showInfo, tooltip

Expand All @@ -14,6 +13,7 @@
from ...main.subdecks import SUBDECK_TAG
from ...settings import config, url_view_deck
from ..media_sync import media_sync
from ..operations import AddonQueryOp
from ..utils import ask_user


Expand Down Expand Up @@ -128,13 +128,13 @@ def on_success(deck_creation_result: DeckCreationResult) -> None:
f"<a href={deck_url}>{deck_url}</a>"
)

def on_failure(exc: Exception):
def on_failure(exc: Exception) -> None:
aqt.mw.progress.finish()
raise exc

op = QueryOp(
op = AddonQueryOp(
parent=aqt.mw,
op=lambda col: create_ankihub_deck(
op=lambda _: create_ankihub_deck(
deck_name,
private=private,
add_subdeck_tags=add_subdeck_tags,
Expand Down

0 comments on commit 4e5526a

Please sign in to comment.