From: Sebastian Spaeth Date: Thu, 17 Jan 2013 21:37:41 +0000 (+0100) Subject: Return to media collection page if no collection selected X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ba5ea989a5826440e8b84af8128dadd0ae252259;p=mediagoblin.git Return to media collection page if no collection selected schendje rightly pointed out that we should not return to the media homepage if we did not select a collection on the "collect" page, but should actually return to the collect page. This is an improvement of the user experience ;-) Signed-off-by: Sebastian Spaeth --- diff --git a/mediagoblin/user_pages/views.py b/mediagoblin/user_pages/views.py index 30c78a38..d1ec23dc 100644 --- a/mediagoblin/user_pages/views.py +++ b/mediagoblin/user_pages/views.py @@ -226,6 +226,10 @@ def media_collect(request, media): messages.add_message( request, messages.ERROR, _('You have to select or add a collection')) + return redirect(request, "mediagoblin.user_pages.media_collect", + user=media.get_uploader.username, + media=media.id) + # Check whether media already exists in collection elif CollectionItem.query.filter_by(