From cc28f6db6bf00eaadfde28317aeea2c4705d29e7 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 1 May 2012 20:43:16 +0000 Subject: [PATCH] minor update --- lib/core/dump.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/core/dump.py b/lib/core/dump.py index 78654196d..774b16d61 100644 --- a/lib/core/dump.py +++ b/lib/core/dump.py @@ -358,7 +358,8 @@ class Dump: fields = len(tableValues) - 1 columns = tableValues.keys() - columns.sort(key=lambda x: x.lower() if isinstance(x, basestring) else x) + _ = lambda x: x and "id" in x.lower() + columns = sorted(sorted(columns, key=len), lambda x, y: -1 if _(x) and not _(y) else 1 if not _(x) and _(y) else 0) for column in columns: if column != "__infos__":