changeset 196:561585f470a4

Show the correct messages on user delete.
author Daniele Nicolodi <daniele@grinta.net>
date Fri, 11 Nov 2011 12:15:01 +0100
parents 8b0bdb899c2a
children 891229adcf66
files src/ltpdarepo/views/users.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ltpdarepo/views/users.py	Tue Nov 08 22:01:21 2011 +0100
+++ b/src/ltpdarepo/views/users.py	Fri Nov 11 12:15:01 2011 +0100
@@ -202,8 +202,9 @@
         if request.form.get('ok'):
             user.delete()
             flash('User deleted.')
+            return redirect(url_for('manage.users.index'))
         flash('Operation cancelled.')
-        return redirect(url_for('manage.users.index'))
+        return redirect(url_for('manage.users.view', username=username))
     return render_template('users/drop.html', form=form, user=user)