aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/decorators.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2013-02-26 13:54:19 -0600
committerChristopher Allan Webber <cwebber@dustycloud.org>2013-02-26 13:54:19 -0600
commit697c74c2de0cc940b45014f9becdfa55f961d193 (patch)
treed496904039c9d8e0ab223c13c9f8e0d4e4b2f3a7 /mediagoblin/decorators.py
parent7de20e52345949fa9d377f06ab0241d98063d9c9 (diff)
downloadmediagoblin-697c74c2de0cc940b45014f9becdfa55f961d193.tar.lz
mediagoblin-697c74c2de0cc940b45014f9becdfa55f961d193.tar.xz
mediagoblin-697c74c2de0cc940b45014f9becdfa55f961d193.zip
Replacing several request.matchdict['media'] -> media_slug ... shorter!
Thanks for pointing this out, Elrond ;) This commit sponsored by Gerardo Joven Valdivia. Thank you!
Diffstat (limited to 'mediagoblin/decorators.py')
-rw-r--r--mediagoblin/decorators.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mediagoblin/decorators.py b/mediagoblin/decorators.py
index 14b4f8fc..b6f6f909 100644
--- a/mediagoblin/decorators.py
+++ b/mediagoblin/decorators.py
@@ -130,7 +130,7 @@ def get_user_media_entry(controller):
# might not be a slug, might be an id, but whatever
media_slug = request.matchdict['media']
- if u":" in request.matchdict['media']:
+ if u":" in media_slug:
# okay, it's not actually a slug, it's some kind of identifier,
# probably id:
if media_slug.startswith(u'id:'):
@@ -144,7 +144,7 @@ def get_user_media_entry(controller):
else:
# no magical id: stuff? It's a slug!
media = MediaEntry.query.filter_by(
- slug=request.matchdict['media'],
+ slug=media_slug,
state=u'processed',
uploader=user.id).first()