mirror of
https://github.com/ankitects/anki.git
synced 2025-11-13 16:17:13 -05:00
use pure field model order when importing
This commit is contained in:
parent
97eb12e343
commit
36421cf166
1 changed files with 1 additions and 3 deletions
|
|
@ -70,9 +70,7 @@ class Importer(object):
|
||||||
def resetMapping(self):
|
def resetMapping(self):
|
||||||
"Reset mapping to default."
|
"Reset mapping to default."
|
||||||
numFields = self.fields()
|
numFields = self.fields()
|
||||||
m = []
|
m = [f for f in self.model.fieldModels]
|
||||||
[m.append(f) for f in self.model.fieldModels if f.required]
|
|
||||||
[m.append(f) for f in self.model.fieldModels if not f.required]
|
|
||||||
m.append(0)
|
m.append(0)
|
||||||
rem = max(0, self.fields() - len(m))
|
rem = max(0, self.fields() - len(m))
|
||||||
m += [None] * rem
|
m += [None] * rem
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue