From 521b2c11e07bcd373275ddf918e523fcdac8be03 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 20 Aug 2018 18:42:36 +0200 Subject: Fix sorting on tables --- ishtar_common/models.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index dfcf503af..8d0545885 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -3317,7 +3317,8 @@ class Document(OwnPerms, ImageModel, FullSearch, Imported): SLUG = 'document' LINK_SPLIT = u"<||>" - TABLE_COLS = ['title', 'source_type', 'cache_related_label', 'authors', + TABLE_COLS = ['title', 'source_type', 'cache_related_label', + 'authors__cached_label', 'associated_url'] COL_LINK = ['associated_url'] BASE_SEARCH_VECTORS = ['title', 'source_type__label', 'external_id', @@ -3327,6 +3328,8 @@ class Document(OwnPerms, ImageModel, FullSearch, Imported): BOOL_FIELDS = ['duplicate'] + COL_LABELS = {"authors__cached_label": _(u"Authors")} + CACHED_LABELS = ['cache_related_label'] EXTRA_REQUEST_KEYS = { "operations": "operations__pk", @@ -3337,6 +3340,7 @@ class Document(OwnPerms, ImageModel, FullSearch, Imported): "finds__base_finds__context_record__pk", "finds__base_finds__context_record__operation": "finds__base_finds__context_record__operation__pk", + 'authors__cached_label': 'authors__cached_label', } # alternative names of fields for searches -- cgit v1.2.3