diff options
| author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-08-22 09:50:31 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-08-22 09:50:31 +0200 | 
| commit | 45c078a6d1960f34315c7ea83f1b15d275c054be (patch) | |
| tree | aa5970043b874b009ecb9e8f9b9b810b5797248c /archaeological_operations/models.py | |
| parent | a0167300b0fe9c39c4ce0f6260c7d014ee51dbcc (diff) | |
| download | Ishtar-45c078a6d1960f34315c7ea83f1b15d275c054be.tar.bz2 Ishtar-45c078a6d1960f34315c7ea83f1b15d275c054be.zip | |
More explicit label for operation and files (refs #1324)
Diffstat (limited to 'archaeological_operations/models.py')
| -rw-r--r-- | archaeological_operations/models.py | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 7c57087c5..d51e7a518 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -26,7 +26,7 @@ from django.db.models import Q, Count, Sum, Max, Avg  from django.db.models.signals import post_save, m2m_changed  from django.utils.translation import ugettext_lazy as _, ugettext -from ishtar_common.utils import cached_label_changed +from ishtar_common.utils import cached_label_changed, shortify  from ishtar_common.models import GeneralType, BaseHistorizedItem, \       HistoricalRecords, LightHistorizedItem, OwnPerms, Department, Source,\ @@ -155,6 +155,8 @@ class Operation(BaseHistorizedItem, OwnPerms):          if self.operation_code:              items.append("-".join((unicode(self.year),                                 unicode(self.operation_code)))) +        if self.common_name: +            items.append(shortify(self.common_name))          cached_label = settings.JOINT.join(items)          return cached_label | 
