don't allow mature delay over a week for now; fix delay being reset to 0

This commit is contained in:
Damien Elmes 2010-11-26 23:35:26 +09:00
parent 386de21f87
commit ca9aeaa086

View file

@ -3642,10 +3642,8 @@ update cards set type = type - 3 where type between 0 and 2 and priority = -3"""
# - new delay1 handling # - new delay1 handling
if deck.delay0 == deck.delay1: if deck.delay0 == deck.delay1:
deck.delay1 = 0 deck.delay1 = 0
elif deck.delay1 >= 28800:
deck.delay1 = 1
else: else:
deck.delay1 = 0 deck.delay1 = min(deck.delay1, 7)
# unsuspend buried/rev early - can remove priorities in the future # unsuspend buried/rev early - can remove priorities in the future
ids = deck.s.column0( ids = deck.s.column0(
"select id from cards where type > 2 or priority between -2 and -1") "select id from cards where type > 2 or priority between -2 and -1")