Simplify comparisons
This commit is contained in:
parent
67728e73d7
commit
4446b85ef2
@ -240,7 +240,7 @@ and notes.mid = ? and cards.ord = ?""", m['id'], ord)
|
|||||||
return m['sortf']
|
return m['sortf']
|
||||||
|
|
||||||
def setSortIdx(self, m, idx):
|
def setSortIdx(self, m, idx):
|
||||||
assert idx >= 0 and idx < len(m['flds'])
|
assert 0 <= idx < len(m['flds'])
|
||||||
self.col.modSchema(check=True)
|
self.col.modSchema(check=True)
|
||||||
m['sortf'] = idx
|
m['sortf'] = idx
|
||||||
self.col.updateFieldCache(self.nids(m))
|
self.col.updateFieldCache(self.nids(m))
|
||||||
|
@ -56,7 +56,7 @@ class Scheduler:
|
|||||||
|
|
||||||
def answerCard(self, card, ease):
|
def answerCard(self, card, ease):
|
||||||
self.col.log()
|
self.col.log()
|
||||||
assert ease >= 1 and ease <= 4
|
assert 1 <= ease <= 4
|
||||||
self.col.markReview(card)
|
self.col.markReview(card)
|
||||||
if self._burySiblingsOnAnswer:
|
if self._burySiblingsOnAnswer:
|
||||||
self._burySiblings(card)
|
self._burySiblings(card)
|
||||||
|
Loading…
Reference in New Issue
Block a user