published-fix
This commit is contained in:
parent
d9189fb48b
commit
f089d4903b
|
@ -21,7 +21,7 @@ async def load_shouts_by(_, info, by, amount=50, offset=0):
|
||||||
"""
|
"""
|
||||||
:param by: {
|
:param by: {
|
||||||
layout: 'audio',
|
layout: 'audio',
|
||||||
published: true,
|
visibility: "public",
|
||||||
author: 'discours',
|
author: 'discours',
|
||||||
topic: 'culture',
|
topic: 'culture',
|
||||||
title: 'something',
|
title: 'something',
|
||||||
|
@ -49,8 +49,8 @@ async def load_shouts_by(_, info, by, amount=50, offset=0):
|
||||||
if by.get("reacted"):
|
if by.get("reacted"):
|
||||||
user = info.context["request"].user
|
user = info.context["request"].user
|
||||||
q = q.filter(Reaction.createdBy == user.slug)
|
q = q.filter(Reaction.createdBy == user.slug)
|
||||||
if by.get("published"):
|
if by.get("visibility"):
|
||||||
q = q.filter(Shout.publishedAt.is_not(None))
|
q = q.filter(Shout.visibility == by.get("visibility") or "public")
|
||||||
if by.get("layout"):
|
if by.get("layout"):
|
||||||
q = q.filter(Shout.layout == by["layout"])
|
q = q.filter(Shout.layout == by["layout"])
|
||||||
if by.get("author"):
|
if by.get("author"):
|
||||||
|
|
|
@ -218,7 +218,6 @@ input ShoutsBy {
|
||||||
topic: String
|
topic: String
|
||||||
author: String
|
author: String
|
||||||
layout: String
|
layout: String
|
||||||
published: Boolean
|
|
||||||
visibility: String
|
visibility: String
|
||||||
order: String
|
order: String
|
||||||
days: Int
|
days: Int
|
||||||
|
|
Loading…
Reference in New Issue
Block a user