From d0023b996f844a26851ebf76bfc32195543101d1 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 12 Jun 2018 20:21:47 +0200 Subject: Fix document add action in sheet --- ishtar_common/models.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ishtar_common') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index bc0cb7b09..d073b02c8 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -1222,6 +1222,10 @@ class DocumentItem(object): """ # url, base_text, icon, extra_text, extra css class actions = [] + + if not hasattr(self, 'SLUG'): + return actions + can_add_doc = request.user.ishtaruser.has_right( 'add_document', request.session) or ( request.user.ishtaruser.has_right( -- cgit v1.2.3