summaryrefslogtreecommitdiff
path: root/archaeological_context_records/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2016-11-03 15:48:08 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2016-11-03 15:48:08 +0100
commite3541fca4619b6d6458c376067d299d11f15a2b8 (patch)
tree41450cdd1603714842af8a3a99781a88a9bcfdf7 /archaeological_context_records/models.py
parentc5a639a8c59c6aa0d9edf1895cdced3cbdebc7a2 (diff)
parentc9608717bfb09c3a52336666358c0cf816c65d76 (diff)
downloadIshtar-e3541fca4619b6d6458c376067d299d11f15a2b8.tar.bz2
Ishtar-e3541fca4619b6d6458c376067d299d11f15a2b8.zip
Merge branch 'master' into v0.9
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r--archaeological_context_records/models.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index bbfb410f8..3f4dc1598 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -121,13 +121,13 @@ post_delete.connect(post_save_cache, sender=IdentificationType)
class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem):
SHOW_URL = 'show-contextrecord'
SLUG = 'contextrecord'
- TABLE_COLS = ['parcel.town', 'operation.year',
- 'operation.operation_code',
+ TABLE_COLS = ['parcel__town', 'operation__year',
+ 'operation__operation_code',
'label', 'unit']
if settings.COUNTRY == 'fr':
- TABLE_COLS.insert(1, 'operation.code_patriarche')
+ TABLE_COLS.insert(1, 'operation__code_patriarche')
TABLE_COLS_FOR_OPE = ['label', 'parcel', 'unit',
- 'datings.period', 'description']
+ 'datings__period', 'description']
TABLE_COLS_FOR_OPE_LBL = {'section__parcel_number': _("Parcel")}
CONTEXTUAL_TABLE_COLS = {
'full': {
@@ -140,6 +140,7 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem):
EXTRA_REQUEST_KEYS = {
'parcel__town': 'parcel__town__pk',
'operation__year': 'operation__year__contains',
+ 'year': 'operation__year__contains',
'operation__code_patriarche': 'operation__code_patriarche',
'operation__operation_code': 'operation__operation_code',
'datings__period': 'datings__period__pk',
@@ -363,6 +364,7 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem):
self.auto_external_id = True
self.external_id = external_id
if updated:
+ self._cached_label_checked = False
self.save()
return returned