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 | 2266775ccf26574da6cdd5fc5d514bb999a3f912 (patch) | |
| tree | 627361e11d145b7477cd64557a58032e5f6df478 /archaeological_operations/models.py | |
| parent | 8a21118a4ab368f812ba1abc485e2662cc365ea6 (diff) | |
| download | Ishtar-2266775ccf26574da6cdd5fc5d514bb999a3f912.tar.bz2 Ishtar-2266775ccf26574da6cdd5fc5d514bb999a3f912.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 |
