summaryrefslogtreecommitdiff
path: root/archaeological_operations/wizards.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_operations/wizards.py')
-rw-r--r--archaeological_operations/wizards.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py
index b0708f2db..de38beb95 100644
--- a/archaeological_operations/wizards.py
+++ b/archaeological_operations/wizards.py
@@ -395,8 +395,13 @@ class OperationAdministrativeActWizard(OperationWizard):
dct['redirect'] = reverse('generatedoc-administrativeactop',
args=[admact.pk, r[0]])
# make the new object a default
- self.request.session[self.current_obj_slug] = unicode(admact.pk)
- self.request.session[self.get_object_name(admact)] = unicode(admact.pk)
+ ishtaruser = self.request.user.ishtaruser \
+ if hasattr(self.request.user, 'ishtaruser') else None
+ if ishtaruser and ishtaruser.current_profile \
+ and ishtaruser.current_profile.auto_pin:
+ self.request.session[self.current_obj_slug] = unicode(admact.pk)
+ self.request.session[self.get_object_name(admact)] = unicode(
+ admact.pk)
res = render(self.request, 'ishtar/wizard/wizard_done.html', dct)
return res