Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cc28f6d

Browse files
committed
minor update
1 parent 8013a64 commit cc28f6d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/core/dump.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,8 @@ def dbTableValues(self, tableValues):
358358
fields = len(tableValues) - 1
359359

360360
columns = tableValues.keys()
361-
columns.sort(key=lambda x: x.lower() if isinstance(x, basestring) else x)
361+
_ = lambda x: x and "id" in x.lower()
362+
columns = sorted(sorted(columns, key=len), lambda x, y: -1 if _(x) and not _(y) else 1 if not _(x) and _(y) else 0)
362363

363364
for column in columns:
364365
if column != "__infos__":

0 commit comments

Comments
 (0)