Set session state dirty if updated
When updating session with data from the client, the states must be mark as dirty to be saved in the database at the end of the process. issue2421
This commit is contained in:
1 parent
e348c49312
commit
75931c4bf8
1 file changed
+3
@@ -328,7 +328,10 @@ class Wizard(WarningErrorMixin, URLMixin):
|
||||
if isinstance(session, (int, long)):
|
||||
session = Session(self, session)
|
||||
for key, value in data.iteritems():
|
||||
prev_data = session.data[key].copy()
|
||||
session.data[key].update(value)
|
||||
if prev_data != session.data[key]:
|
||||
getattr(session, key).dirty = True
|
||||
|
||||
state = self.states[state_name]
|
||||
result = {}
|
||||
|
||||
Reference in new issue
Block a user