0.2.15
Some checks failed
deploy / deploy (push) Failing after 1m58s

This commit is contained in:
2023-11-24 02:00:28 +03:00
parent c150d28447
commit a63cf24812
12 changed files with 187 additions and 139 deletions

View File

@@ -135,13 +135,13 @@ def topic_follow(follower_id, slug):
return False
def topic_unfollow(user_id, slug):
def topic_unfollow(follower_id, slug):
try:
with local_session() as session:
sub = (
session.query(TopicFollower)
.join(Topic)
.filter(and_(TopicFollower.follower == user_id, Topic.slug == slug))
.filter(and_(TopicFollower.follower == follower_id, Topic.slug == slug))
.first()
)
if sub:
@@ -153,6 +153,7 @@ def topic_unfollow(user_id, slug):
return False
@query.field("topicsRandom")
async def topics_random(_, info, amount=12):
q = select(Topic)
q = q.join(ShoutTopic)