if spacing is disabled, don't decrement counts

This commit is contained in:
Damien Elmes 2010-12-01 02:54:21 +09:00
parent bb901dfa16
commit 53fbc9b3ee

View file

@ -834,10 +834,13 @@ where factId = :fid and id != :id""", fid=card.factId, id=card.id) or 0
space = 0
space = space * spaceFactor * 86400.0
space = max(minSpacing, space)
if space:
space += time.time()
return space
def _spaceCards(self, card, space):
if not space:
return
# adjust counts
for (type, count) in self.s.all("""
select type, count(type) from cards