summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archaeological_context_records/models.py2
-rw-r--r--archaeological_finds/models.py8
2 files changed, 4 insertions, 6 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index c6d8ec023..57c95c3b6 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -155,7 +155,7 @@ class ContextRecord(BaseHistorizedItem, OwnPerms):
def _real_label(self):
if not self.operation.code_patriarche:
return
- return settings.JOINT.join((self.operation.code_patriarche,
+ return settings.JOINT.join((unicode(self.operation.code_patriarche),
self.label))
def _temp_label(self):
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