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", "")
|
||||
if isinstance(by_featured, bool) and by_featured:
|
||||
q = q.filter(Shout.featured_at > Shout.published_at)
|
||||
by_featured = filters.get("featured")
|
||||
if by_featured:
|
||||
q = q.filter(Shout.featured_at.is_not(None))
|
||||
by_layouts = filters.get("layouts")
|
||||
if by_layouts:
|
||||
q = q.filter(Shout.layout.in_(by_layouts))
|
||||
|
|
Loading…
Reference in New Issue
Block a user