Fix off-by-one bug generating an identity mapping.

This is code that wasn't fixed due to the Record change.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
This commit is contained in:
brian m. carlson 2012-05-03 19:39:05 -05:00
parent a885000427
commit ff54485ba4

2
newfol
View file

@ -1246,7 +1246,7 @@ def import_into(dtbname, dbtype, minfields=0, strict=False, identity=False):
else:
msg = "No mapping specified for db {0}; using identity mapping"
mapobj = Mapping(dtbname, DatabaseData().schemata.nfields)
for i in range(1, DatabaseData().schemata.nfields):
for i in range(DatabaseData().schemata.nfields):
mapobj.set_field_mapping(i, i, i, "")
print(msg.format(dtbname), file=sys.stderr)
DatabaseData().records = list(filter(lambda x: x.dbname != dtbname,