summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-08-07 16:23:42 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-08-07 16:23:42 +0200
commit54397ca4083674b927f8637325c96dbfd358caa2 (patch)
treeed662287249d9d95807d9d7d7d8be5dd9b855464 /ishtar_common
parent6481407b869af740d0ad9e79f7523effa892b119 (diff)
downloadIshtar-54397ca4083674b927f8637325c96dbfd358caa2.tar.bz2
Ishtar-54397ca4083674b927f8637325c96dbfd358caa2.zip
Sheet: fix display of non historical
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 131f08323..803a2367c 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -972,14 +972,14 @@ class BaseHistorizedItem(Imported):
def last_edition_date(self):
try:
return self.history.order_by('-history_date').all()[0].history_date
- except IndexError:
+ except (AttributeError, IndexError):
return
@property
def history_creation_date(self):
try:
return self.history.order_by('history_date').all()[0].history_date
- except IndexError:
+ except (AttributeError, IndexError):
return
def rollback(self, date):