diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-08-25 13:39:11 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-08-25 13:39:11 +0200 |
commit | ba59eb55ca89f916a64fe51ac80f51634a2c45c3 (patch) | |
tree | a257ee17dbc673bbd045e5559144d40d37b6b244 /archaeological_finds | |
parent | 9f8e9e9157f23458417433eff07dc3efc5542309 (diff) | |
download | Ishtar-ba59eb55ca89f916a64fe51ac80f51634a2c45c3.tar.bz2 Ishtar-ba59eb55ca89f916a64fe51ac80f51634a2c45c3.zip |
Fix conversion to string for display of OA number (refs #1317)
Diffstat (limited to 'archaeological_finds')
-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 |