diff options
Diffstat (limited to 'archaeological_finds/models.py')
-rw-r--r-- | archaeological_finds/models.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/archaeological_finds/models.py b/archaeological_finds/models.py index b5a13868d..4b1e95e34 100644 --- a/archaeological_finds/models.py +++ b/archaeological_finds/models.py @@ -77,7 +77,7 @@ class BaseFind(BaseHistorizedItem, OwnPerms): return find = self.get_last_find() ope = self.context_record.operation - c_id = [ope.code_patriarche or \ + c_id = [unicode(ope.code_patriarche) or \ (unicode(ope.year) + "-" + unicode(ope.operation_code))] c_id.append(find and find.material_type.code or '') c_id.append(self.context_record.label) @@ -90,7 +90,7 @@ class BaseFind(BaseHistorizedItem, OwnPerms): return find = self.get_last_find() ope = self.context_record.operation - c_id = [ope.code_patriarche or \ + c_id = [unicode(ope.code_patriarche) or \ (unicode(ope.year) + "-" + unicode(ope.operation_code))] c_id.append(unicode(self.index)) return settings.JOINT.join(c_id) @@ -120,9 +120,7 @@ class BaseFind(BaseHistorizedItem, OwnPerms): lbl) if it]) def _temp_label(self): - if not self.context_record.parcel \ - or not self.context_record.operation \ - or not self.context_record.operation.code_patriarche: + if not self.context_record.parcel: return find = self.get_last_find() lbl = find.label or self.label |