featured-filter-fix
This commit is contained in:
parent
b1bd9a4829
commit
605d60f126
|
@ -59,9 +59,9 @@ def apply_filters(q, filters, author_id=None):
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
by_featured = filters.get("featured", "")
|
by_featured = filters.get("featured")
|
||||||
if isinstance(by_featured, bool) and by_featured:
|
if by_featured:
|
||||||
q = q.filter(Shout.featured_at > Shout.published_at)
|
q = q.filter(Shout.featured_at.is_not(None))
|
||||||
by_layouts = filters.get("layouts")
|
by_layouts = filters.get("layouts")
|
||||||
if by_layouts:
|
if by_layouts:
|
||||||
q = q.filter(Shout.layout.in_(by_layouts))
|
q = q.filter(Shout.layout.in_(by_layouts))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user