From 54397ca4083674b927f8637325c96dbfd358caa2 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 7 Aug 2017 16:23:42 +0200 Subject: Sheet: fix display of non historical --- ishtar_common/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ishtar_common') 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): -- cgit v1.2.3