summaryrefslogtreecommitdiff
path: root/archaeological_finds/models_treatments.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_finds/models_treatments.py')
-rw-r--r--archaeological_finds/models_treatments.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py
index e6237efef..a826d2a4a 100644
--- a/archaeological_finds/models_treatments.py
+++ b/archaeological_finds/models_treatments.py
@@ -59,7 +59,7 @@ post_delete.connect(post_save_cache, sender=TreatmentType)
class Treatment(BaseHistorizedItem, ImageModel, OwnPerms):
SHOW_URL = 'show-treatment'
- TABLE_COLS = ('year', 'index', 'treatment_types_lbl', 'label', 'person',
+ TABLE_COLS = ('year', 'index', 'treatment_types__label', 'label', 'person',
'start_date', 'downstream_cached_label',
'upstream_cached_label')
REVERSED_BOOL_FIELDS = ['image__isnull']
@@ -208,10 +208,8 @@ class AbsFindTreatments(models.Model):
# primary_key is set to prevent django to ask for an id column
# treatment is not a primary key
treatment_nb = models.IntegerField(_(u"Order"))
- TABLE_COLS = ['treatment__treatment_type',
- 'treatment__start_date', 'treatment__end_date',
- 'treatment__location', 'treatment__container',
- 'treatment__person', 'treatment_nb']
+ TABLE_COLS = ["treatment__" + col for col in Treatment.TABLE_COLS] + \
+ ['treatment_nb']
EXTRA_FULL_FIELDS_LABELS = {
'treatment__treatment_type': _(u"Treatment type"),
'treatment__start_date': _(u"Start date"),