From dd3a5ccba4209a98fd6e7e747e73e54aaa6cfd9f Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sun, 9 Jan 2011 13:36:15 +0100 Subject: Make the current edited item the default session item --- ishtar/furnitures/forms.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ishtar/furnitures/forms.py b/ishtar/furnitures/forms.py index 6c1b48fc4..46a6f3075 100644 --- a/ishtar/furnitures/forms.py +++ b/ishtar/furnitures/forms.py @@ -311,6 +311,8 @@ class Wizard(NamedUrlSessionFormWizard): current_step = storage.get_current_step() or self.get_first_step( request, storage) c_form = self.form_list[current_step] + # make the current object the default item for the session + request.session[obj.__class__.__name__.lower()] = unicode(obj.pk) initial = {} if hasattr(c_form, 'base_fields'): for field in c_form.base_fields.keys(): -- cgit v1.2.3