diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-03-13 11:51:50 +0100 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-03-13 11:51:50 +0100 |
| commit | 86b2405dcf387ea1111a7868b9ec24caf712d168 (patch) | |
| tree | 627361e11d145b7477cd64557a58032e5f6df478 /archaeological_operations/models.py | |
| parent | b927a41b76152d722b979abde5cbd09e4ddb552a (diff) | |
| download | Ishtar-86b2405dcf387ea1111a7868b9ec24caf712d168.tar.bz2 Ishtar-86b2405dcf387ea1111a7868b9ec24caf712d168.zip | |
Operations: better display of missing operation_code
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 a0b751802..399b536e2 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -161,7 +161,8 @@ class Operation(BaseHistorizedItem, OwnPerms): year_index_lbl = _(u"Operation code") @property def year_index(self): - lbl = unicode(self.operation_code) + if not self.operation_code: + return "" lbl = u"%d-%s%s" % (self.year, (3-len(lbl))*"0", lbl) return lbl |
