From 9fe62ae077510c684bb32fcaabf0cef7f0be3506 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 9 Nov 2018 19:33:13 +0100 Subject: Fix session check --- ishtar_common/wizards.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ishtar_common/wizards.py') diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index d0a7df84b..a439cc014 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -908,7 +908,8 @@ class Wizard(IshtarWizard): ishtaruser = self.request.user.ishtaruser \ if hasattr(self.request.user, 'ishtaruser') else None - if ishtaruser and ishtaruser.current_profile.auto_pin: + if ishtaruser and ishtaruser.current_profile \ + and ishtaruser.current_profile.auto_pin: # make the new object a default if self.current_obj_slug: self.request.session[self.current_obj_slug] = unicode(obj.pk) @@ -1389,7 +1390,8 @@ class Wizard(IshtarWizard): ishtaruser = self.request.user.ishtaruser \ if hasattr(self.request.user, 'ishtaruser') else None - if ishtaruser and ishtaruser.current_profile.auto_pin: + if ishtaruser and ishtaruser.current_profile \ + and ishtaruser.current_profile.auto_pin: # make the current object the default item for the session self.request.session[self.get_object_name(obj)] = unicode(obj.pk) -- cgit v1.2.3