diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-11-09 19:33:13 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-11-09 19:33:13 +0100 |
commit | 363a3c064c5985969718edbd0f82e2ad20c77b0b (patch) | |
tree | b92988c4bcd3a4cd60fd639517c8d69f6480794d /ishtar_common/wizards.py | |
parent | 46f8b8b4297759a8c6301c6f18f2c851cfbb1e3b (diff) | |
download | Ishtar-363a3c064c5985969718edbd0f82e2ad20c77b0b.tar.bz2 Ishtar-363a3c064c5985969718edbd0f82e2ad20c77b0b.zip |
Fix session check
Diffstat (limited to 'ishtar_common/wizards.py')
-rw-r--r-- | ishtar_common/wizards.py | 6 |
1 files changed, 4 insertions, 2 deletions
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) |