Fix deletion of rows where the primary key isn't at ordinal zero. Fixes #2274

This commit is contained in:
Wayne Winch Jr 2017-03-24 13:32:56 +00:00 committed by Dave Page
parent ee73b5ba26
commit 5f2a15dd6d

View File

@ -496,7 +496,7 @@ class TableCommand(GridCommand):
for k, v in row.items(): for k, v in row.items():
# Set primary key with label & delete index based mapped key # Set primary key with label & delete index based mapped key
try: try:
row[keys[int(k)]] = v row[changed_data['columns'][int(k)]['name']] = v
except ValueError: except ValueError:
continue continue
del row[k] del row[k]