def lp_media_for_type(db, type):
return media_entries_for_tag_slug(db, LP_TAG).\
- filter(MediaEntry.media_type == type).\
+ filter((MediaEntry.media_type == type)
+ & (MediaEntry.state == u'processed')).\
order_by(MediaEntry.created.desc()).\
limit(MAX_HOME_ITEMS)
from mediagoblin.tools.response import render_to_response
from mediagoblin.decorators import uses_pagination
-def type_listing(type, title, request, page):
+def type_listing(media_type, title, request, page):
cursor = MediaEntry.query.\
- filter(MediaEntry.media_type == type).\
+ filter((MediaEntry.media_type == media_type)
+ & (MediaEntry.state == u'processed')).\
order_by(MediaEntry.created.desc())
pagination = Pagination(page, cursor)