Skip to content

Commit

Permalink
Fix note id
Browse files Browse the repository at this point in the history
  • Loading branch information
hwiorn committed Dec 28, 2022
1 parent bd96e56 commit 759b190
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def tools_open_org_note():
elif aqt.mw.state == 'deckBrowser' or aqt.mw.state == 'overview':
current_card = bcard()
# current_side = aqt.mw.reviewer.state
note_id = current_card.id
note_id = current_card.nid
# print('CARD ID::::', note_id)
open_anki_note(note_id)
except Exception: # just in case, pylint:disable=broad-except
Expand All @@ -162,7 +162,7 @@ def __init__(self):
super().__init__(aqt.qt.QIcon(ICON_PATH), open_btn_text)
def request_open_note():
if check_browser():
note_id = bcard().id
note_id = bcard().nid
# print("CARD ID:", note_id)
open_anki_note(note_id)

Expand All @@ -185,10 +185,10 @@ def editor_button():
def createOpenButton(editor):
note_id = ''
if check_browser():
note_id = bcard().id
note_id = bcard().nid
# print("CARD ID:", note_id)
else:
note_id = card().id
note_id = card().nid
# print("EDITOR CARD:", note_id)
open_anki_note(note_id)

Expand Down Expand Up @@ -216,7 +216,7 @@ def context_menu_open_note():
# current_side = aqt.mw.reviewer.state
elif web_view.objectName() == 'mainText': # card template dialog
current_card = window.card
note_id = current_card.id
note_id = current_card.nid
# print('CARD ID::::', note_id)
open_anki_note(note_id)
except Exception: # just in case, pylint:disable=broad-except
Expand Down

0 comments on commit 759b190

Please sign in to comment.