diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-07-04 01:29:08 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2011-07-04 01:29:08 +0200 |
| commit | 854c11388278f54214cb249e05a037cc31e5c59b (patch) | |
| tree | 06112162efa328a43362267e8f6d0e31d96aee57 | |
| parent | a14d398d774bcacc5da7114ff368cf61104de82b (diff) | |
| download | Ishtar-854c11388278f54214cb249e05a037cc31e5c59b.tar.bz2 Ishtar-854c11388278f54214cb249e05a037cc31e5c59b.zip | |
Correction of display in ID of finds (closes #479)
| -rw-r--r-- | ishtar/ishtar_base/models.py | 9 |
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', |
