From 5dcd3ea556111948fe9b53187108d85bc069d3c5 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 4 Jul 2011 01:29:08 +0200 Subject: Correction of display in ID of finds (closes #479) --- ishtar/ishtar_base/models.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'ishtar') 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', -- cgit v1.2.3