formatted, linted, fixed

This commit is contained in:
2022-09-04 20:20:38 +03:00
parent f7b9a066b9
commit 71f3ac5ed6
22 changed files with 357 additions and 303 deletions

View File

@@ -41,7 +41,7 @@ async def user_unpublished_shouts(_, info, page=1, size=10) -> List[Shout]:
shouts = (
session.query(Shout)
.join(ShoutAuthor)
.where(and_(Shout.publishedAt == None, ShoutAuthor.user == user.slug))
.where(and_(not bool(Shout.publishedAt), ShoutAuthor.user == user.slug))
.order_by(desc(Shout.createdAt))
.limit(size)
.offset(page * size)