mirror of
https://github.com/ankitects/anki.git
synced 2025-11-09 06:07:11 -05:00
remove _cidsByDid()
no longer necessary
This commit is contained in:
parent
01942cd076
commit
3b0c5b2fe9
1 changed files with 1 additions and 24 deletions
|
|
@ -1023,30 +1023,7 @@ due = odue, odue = 0, odid = 0, usn = ? where %s""" % (
|
||||||
self.col.usn())
|
self.col.usn())
|
||||||
|
|
||||||
def remFromDyn(self, cids):
|
def remFromDyn(self, cids):
|
||||||
for did, grpcids in self._cidsByDid(cids):
|
self.emptyDyn(None, "id in %s and odid" % ids2str(cids))
|
||||||
self.emptyDyn(did, "id in %s" % ids2str(grpcids))
|
|
||||||
|
|
||||||
def _cidsByDid(self, cids):
|
|
||||||
groups = []
|
|
||||||
currentCids = []
|
|
||||||
currentDid = None
|
|
||||||
for id, did in self.col.db.execute("""
|
|
||||||
select id, did from cards where id in %s and odid
|
|
||||||
group by did
|
|
||||||
""" % ids2str(cids)):
|
|
||||||
# next group?
|
|
||||||
if did != currentDid:
|
|
||||||
if currentCids:
|
|
||||||
groups.append((currentDid, currentCids))
|
|
||||||
currentCids = []
|
|
||||||
currentDid = did
|
|
||||||
|
|
||||||
currentCids.append(id)
|
|
||||||
|
|
||||||
if currentCids:
|
|
||||||
groups.append((currentDid, currentCids))
|
|
||||||
|
|
||||||
return groups
|
|
||||||
|
|
||||||
def _dynOrder(self, o, l):
|
def _dynOrder(self, o, l):
|
||||||
if o == DYN_OLDEST:
|
if o == DYN_OLDEST:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue