summaryrefslogtreecommitdiff
path: root/ishtar_common/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/views.py')
-rw-r--r--ishtar_common/views.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/ishtar_common/views.py b/ishtar_common/views.py
index cc2443f80..2b6dead9b 100644
--- a/ishtar_common/views.py
+++ b/ishtar_common/views.py
@@ -992,12 +992,15 @@ def get_item(model, func_name, default_name, extra_request_keys=[],
signe, col_num = sorts[idx]
k = query_table_cols[int(col_num) - 2] # remove id and link col
if k in request_keys:
- k = request_keys[k]
- if k.endswith("__pk"):
- k = k[:-len("__pk")] + "__label"
- if '__' in k:
- k = k.split('__')[0]
- orders.append(signe + k)
+ ks = request_keys[k]
+ if type(ks) not in (tuple, list):
+ ks = [ks]
+ for k in ks:
+ if k.endswith("__pk"):
+ k = k[:-len("__pk")] + "__label"
+ if '__' in k:
+ k = k.split('__')[0]
+ orders.append(signe + k)
else:
# not a standard request key
if idx: # not the first - we ignore this sort