From 0229327c4257cd73cbcf9f35fcfad798f555ae02 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 18 Sep 2013 19:42:18 +0200 Subject: Fix history browsing - bad call to inexistent property (refs #1401) --- ishtar_common/views.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ishtar_common/views.py b/ishtar_common/views.py index d1c03ff08..8469e880c 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -428,7 +428,11 @@ def show_item(model, name): context_instance = RequestContext(request) context_instance.update(dct) n = datetime.datetime.now() - filename = item.associated_filename + filename = "" + if hasattr(item, 'history_object'): + filename = item.history_object.associated_filename + else: + filename = item.associated_filename if doc_type == "odt" and settings.XHTML2ODT_PATH and \ settings.ODT_TEMPLATE: tpl = loader.get_template('ishtar/sheet_%s.html' % name) -- cgit v1.2.3