mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
make sure currentModelId is set and css regenerated on upgrade
This commit is contained in:
parent
c0e992618c
commit
b3937a3280
1 changed files with 5 additions and 0 deletions
|
@ -477,6 +477,11 @@ order by ordinal""", mid)):
|
|||
def _postSchemaUpgrade(deck):
|
||||
"Handle the rest of the upgrade to 2.0."
|
||||
import anki.deck
|
||||
# make sure we have a current model id
|
||||
deck.conf['currentModelId'] = deck.models.models.keys()[0]
|
||||
# regenerate css
|
||||
for m in deck.models.all():
|
||||
deck.models.save(m)
|
||||
# fix creation time
|
||||
deck.sched._updateCutoff()
|
||||
d = datetime.datetime.today()
|
||||
|
|
Loading…
Reference in a new issue