summaryrefslogtreecommitdiff
path: root/archaeological_finds
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-08-20 18:42:36 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-08-20 18:42:36 +0200
commitfab4d28bed4ec75e2efa6527503f3a5ca466534c (patch)
tree01493b511c1b598a41c2ca4dd6630e25124a1e4b /archaeological_finds
parent574a5347872a8222d769d740e40bb74a6c13b967 (diff)
downloadIshtar-fab4d28bed4ec75e2efa6527503f3a5ca466534c.tar.bz2
Ishtar-fab4d28bed4ec75e2efa6527503f3a5ca466534c.zip
Fix sorting on tables
Diffstat (limited to 'archaeological_finds')
-rw-r--r--archaeological_finds/models_treatments.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py
index cd52791e7..5506afae0 100644
--- a/archaeological_finds/models_treatments.py
+++ b/archaeological_finds/models_treatments.py
@@ -54,19 +54,21 @@ class Treatment(DashboardFormItem, ValueGetter, BaseHistorizedItem,
SHOW_URL = 'show-treatment'
TABLE_COLS = ('year', 'index', 'treatment_types__label',
'treatment_state__label',
- 'label', 'person',
+ 'label', 'person__cached_label',
'start_date', 'downstream_cached_label',
'upstream_cached_label')
REVERSED_BOOL_FIELDS = ['documents__image__isnull']
EXTRA_REQUEST_KEYS = {
"downstream_cached_label": "downstream__cached_label",
"upstream_cached_label": "upstream__cached_label",
+ 'person__cached_label': 'person__cached_label',
}
COL_LABELS = {
"downstream_cached_label": _(u"Downstream find"),
"upstream_cached_label": _(u"Upstream find"),
"treatment_types__label": _(u"Type"),
"treatment_state__label": _(u"State"),
+ 'person__cached_label': _(u"Responsible"),
}
# extra keys than can be passed to save method
EXTRA_SAVED_KEYS = ('items', 'user')