aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Spaeth <Sebastian@SSpaeth.de>2013-01-17 22:37:41 +0100
committerSebastian Spaeth <Sebastian@SSpaeth.de>2013-01-17 22:39:22 +0100
commitba5ea989a5826440e8b84af8128dadd0ae252259 (patch)
treea259a7836bf9fd88093d5aaf114f8ab4735c85b6
parent626a093ccc7bd275085cea1bbe7fb6ce14b47321 (diff)
downloadmediagoblin-ba5ea989a5826440e8b84af8128dadd0ae252259.tar.lz
mediagoblin-ba5ea989a5826440e8b84af8128dadd0ae252259.tar.xz
mediagoblin-ba5ea989a5826440e8b84af8128dadd0ae252259.zip
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 <Sebastian@SSpaeth.de>
-rw-r--r--mediagoblin/user_pages/views.py4
1 files changed, 4 insertions, 0 deletions
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(