summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ishtar/ishtar_base/models.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/ishtar/ishtar_base/models.py b/ishtar/ishtar_base/models.py
index 29a97ee83..1e9cf9b21 100644
--- a/ishtar/ishtar_base/models.py
+++ b/ishtar/ishtar_base/models.py
@@ -953,19 +953,24 @@ class BaseItem(BaseHistorizedItem, OwnPerms):
def _real_label(self):
if not self.context_record.parcel.operation.code_patriarche:
return
+ item = self.get_last_item()
+ lbl = item.label or self.label
return JOINT.join([unicode(it) for it in (
self.context_record.parcel.operation.code_patriarche,
self.context_record.label,
- self.label)])
+ lbl) if it])
def _temp_label(self):
if self.context_record.parcel.operation.code_patriarche:
return
+ item = self.get_last_item()
+ lbl = item.label or self.label
return JOINT.join([unicode(it) for it in (
self.context_record.parcel.year,
self.index,
self.context_record.label,
- self.label)])
+ lbl) if it])
+
class Item(BaseHistorizedItem, OwnPerms):
TABLE_COLS = ['label', 'material_type', 'dating.period',
'base_items.context_record.parcel.town',