update requireds saves reqs as lists instead of tuples.

The goal of this change is to be consistent with JSON. Indeed, the
dictionnary is saved as JSON, which has list and does not has
tuple. The request was made in https://github.com/dae/anki/pull/361#issuecomment-565915191
This commit is contained in:
Arthur Milchior 2019-12-15 22:54:19 -08:00
parent 9d6523e4dc
commit a1d602f154

View file

@ -498,7 +498,7 @@ select id from notes where mid = ?)""" % " ".join(map),
flds = [f['name'] for f in m['flds']] flds = [f['name'] for f in m['flds']]
for t in m['tmpls']: for t in m['tmpls']:
ret = self._reqForTemplate(m, flds, t) ret = self._reqForTemplate(m, flds, t)
req.append((t['ord'], ret[0], ret[1])) req.append([t['ord'], ret[0], ret[1]])
m['req'] = req m['req'] = req
def _reqForTemplate(self, m, flds, t): def _reqForTemplate(self, m, flds, t):