summaryrefslogtreecommitdiff
path: root/archaeological_finds
diff options
context:
space:
mode:
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
commitd92a620ab273cc4569b5bad71aeb59957b4804e6 (patch)
treea257ee17dbc673bbd045e5559144d40d37b6b244 /archaeological_finds
parent6e16f2c830c9dae4450609d66b8b46a091976099 (diff)
downloadIshtar-d92a620ab273cc4569b5bad71aeb59957b4804e6.tar.bz2
Ishtar-d92a620ab273cc4569b5bad71aeb59957b4804e6.zip
Fix conversion to string for display of OA number (refs #1317)
Diffstat (limited to 'archaeological_finds')
-rw-r--r--archaeological_finds/models.py8
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