summaryrefslogtreecommitdiff
path: root/archaeological_operations/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2015-01-29 00:08:22 +0100
committerÉtienne Loks <etienne.loks@proxience.com>2015-01-29 00:08:22 +0100
commit999eefae2632bb01a968d088ccd6406f7b0bc896 (patch)
treeaab855539a05f8b9c3dec8df43a7bd01b1adbed4 /archaeological_operations/models.py
parent30463969536705fda601c762ca459b4e51fbb3c5 (diff)
downloadIshtar-999eefae2632bb01a968d088ccd6406f7b0bc896.tar.bz2
Ishtar-999eefae2632bb01a968d088ccd6406f7b0bc896.zip
Fix display of operations - fix bibracte import of operations
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r--archaeological_operations/models.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index 5d8c93ecf..5e3b05097 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -365,7 +365,8 @@ class Operation(BaseHistorizedItem, OwnPerms, ValueGetter, ShortMenuItem,
if not self.operation_code:
return ""
lbl = unicode(self.operation_code)
- lbl = u"%d-%s%s" % (self.year, (3-len(lbl))*"0", lbl)
+ year = self.year or 0
+ lbl = u"%d-%s%s" % (year, (3-len(lbl))*"0", lbl)
return lbl
def clean(self):