This commit is contained in:
parent
f03a6d0efe
commit
9eb2ad21d0
|
@ -55,6 +55,7 @@ def filter_my(info, session, q):
|
||||||
|
|
||||||
|
|
||||||
def apply_filters(q, filters, author_id=None):
|
def apply_filters(q, filters, author_id=None):
|
||||||
|
if isinstance(filters, dict):
|
||||||
if filters.get('reacted'):
|
if filters.get('reacted'):
|
||||||
q.join(Reaction, Reaction.created_by == author_id)
|
q.join(Reaction, Reaction.created_by == author_id)
|
||||||
|
|
||||||
|
@ -236,7 +237,7 @@ async def load_shouts_feed(_, info, options):
|
||||||
q = add_reaction_stat_columns(q, aliased_reaction)
|
q = add_reaction_stat_columns(q, aliased_reaction)
|
||||||
|
|
||||||
# filters
|
# filters
|
||||||
filters = options.get('filters')
|
filters = options.get('filters', {})
|
||||||
if filters:
|
if filters:
|
||||||
q, reader_id = filter_my(info, session, q)
|
q, reader_id = filter_my(info, session, q)
|
||||||
q = apply_filters(q, filters, reader_id)
|
q = apply_filters(q, filters, reader_id)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user