Don't clear out the uid from the session until the record has been updated.

This commit is contained in:
Rob Crittenden 2008-02-20 16:57:01 -05:00
parent 4c588b3d5f
commit 3ede5e42a5

View File

@ -425,9 +425,6 @@ class UserController(IPAController):
turbogears.flash("Something went wrong. You last viewed %s but are trying to update %s" % (kw.get('uid'), edituid))
raise turbogears.redirect('/user/show', uid=kw.get('uid'))
# We no longer need this
cherrypy.session['uid'] = None
# Fix incoming multi-valued fields we created for the form
kw = ipahelper.fix_incoming_fields(kw, 'cn', 'cns')
kw = ipahelper.fix_incoming_fields(kw, 'telephonenumber', 'telephonenumbers')
@ -618,6 +615,9 @@ class UserController(IPAController):
user_groups=user_groups_dicts,
tg_template='ipagui.templates.useredit')
# We no longer need this
cherrypy.session['uid'] = None
turbogears.flash("%s updated!" % kw['uid'])
raise turbogears.redirect('/user/show', uid=kw['uid'])