diff options
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r-- | archaeological_operations/models.py | 3 |
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): |