mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 09:16:38 -04:00
more upgrade fixes
This commit is contained in:
parent
fa1713e9ee
commit
6d7ef66640
1 changed files with 6 additions and 8 deletions
14
anki/deck.py
14
anki/deck.py
|
@ -2501,14 +2501,12 @@ where interval < 1""")
|
||||||
})
|
})
|
||||||
deck.s.statements(
|
deck.s.statements(
|
||||||
"update facts set tags = :t where id = :i", d)
|
"update facts set tags = :t where id = :i", d)
|
||||||
deck.highPriority = deck.highPriority.replace(" ", "-")
|
for k in ('highPriority', 'medPriority',
|
||||||
deck.medPriority = deck.medPriority.replace(" ", "-")
|
'lowPriority', 'suspended'):
|
||||||
deck.lowPriority = deck.lowPriority.replace(" ", "-")
|
x = getattr(deck, k)
|
||||||
deck.suspended = deck.suspended.replace(" ", "-")
|
x = re.sub("([^,]) +", "\\1-", x)
|
||||||
deck.highPriority = deck.highPriority.replace(",", " ")
|
x = re.sub(",", " ", x)
|
||||||
deck.medPriority = deck.medPriority.replace(",", " ")
|
setattr(deck, k, x)
|
||||||
deck.lowPriority = deck.lowPriority.replace(",", " ")
|
|
||||||
deck.suspended = deck.suspended.replace(",", " ")
|
|
||||||
for m in deck.models:
|
for m in deck.models:
|
||||||
for cm in m.cardModels:
|
for cm in m.cardModels:
|
||||||
cm.name = cm.name.replace(" ", "-")
|
cm.name = cm.name.replace(" ", "-")
|
||||||
|
|
Loading…
Reference in a new issue