mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
work around huge perDay values set by other clients
sqlite was choking on the long values
This commit is contained in:
parent
2d408cfe68
commit
ee58e651ef
1 changed files with 11 additions and 1 deletions
|
@ -93,7 +93,17 @@ class DeckManager(object):
|
||||||
def load(self, decks, dconf):
|
def load(self, decks, dconf):
|
||||||
self.decks = json.loads(decks)
|
self.decks = json.loads(decks)
|
||||||
self.dconf = json.loads(dconf)
|
self.dconf = json.loads(dconf)
|
||||||
self.changed = False
|
# set limits to within bounds
|
||||||
|
found = False
|
||||||
|
for c in self.dconf.values():
|
||||||
|
for t in ('rev', 'new'):
|
||||||
|
pd = 'perDay'
|
||||||
|
if c[t][pd] > 999999:
|
||||||
|
c[t][pd] = 999999
|
||||||
|
self.save(c)
|
||||||
|
found = True
|
||||||
|
if not found:
|
||||||
|
self.changed = False
|
||||||
|
|
||||||
def save(self, g=None):
|
def save(self, g=None):
|
||||||
"Can be called with either a deck or a deck configuration."
|
"Can be called with either a deck or a deck configuration."
|
||||||
|
|
Loading…
Reference in a new issue