diff options
| 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 |
| commit | 53f1681fbc71096f8fe7ba951e112ff7ead48b8d (patch) | |
| tree | ed662287249d9d95807d9d7d7d8be5dd9b855464 | |
| parent | 1eb08b91b1dd7ee2d81a8c0454563cb3ab0f0428 (diff) | |
| download | Ishtar-53f1681fbc71096f8fe7ba951e112ff7ead48b8d.tar.bz2 Ishtar-53f1681fbc71096f8fe7ba951e112ff7ead48b8d.zip | |
Sheet: fix display of non historical
| -rw-r--r-- | ishtar_common/models.py | 4 |
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): |
