summaryrefslogtreecommitdiff
path: root/archaeological_operations/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r--archaeological_operations/models.py4
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