Linter pass

This commit is contained in:
Tim Van Baak 2021-10-01 17:19:05 -07:00
parent d172848231
commit 8754823556

View File

@ -93,6 +93,11 @@ def get_unread_count(db: DbContext, membership_id: int) -> int:
return db(
select(func.count(Post.id))
.join(Membership, Membership.lexicon_id == Post.lexicon_id)
.where(or_(Membership.last_post_seen.is_(None), Post.created > Membership.last_post_seen))
.where(
or_(
Membership.last_post_seen.is_(None),
Post.created > Membership.last_post_seen,
)
)
.where(Membership.id == membership_id)
).scalar()