mirror of
https://github.com/ankitects/anki.git
synced 2025-11-08 21:57:12 -05:00
don't allow adding of cards to cram deck
This commit is contained in:
parent
f86d38d0f8
commit
53f6dacf62
1 changed files with 6 additions and 1 deletions
|
|
@ -642,7 +642,12 @@ class Editor(object):
|
||||||
if not name.strip():
|
if not name.strip():
|
||||||
self.note.model()['did'] = 1
|
self.note.model()['did'] = 1
|
||||||
else:
|
else:
|
||||||
self.note.model()['did'] = self.mw.col.decks.id(name)
|
did = self.mw.col.decks.id(name)
|
||||||
|
deck = self.mw.col.decks.get(did)
|
||||||
|
if deck['dyn']:
|
||||||
|
did = 1
|
||||||
|
showInfo(_("Using default deck instead of cram deck."))
|
||||||
|
self.note.model()['did'] = did
|
||||||
# save tags to model
|
# save tags to model
|
||||||
m = self.note.model()
|
m = self.note.model()
|
||||||
m['tags'] = self.note.tags
|
m['tags'] = self.note.tags
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue