This commit is contained in:
Untone 2024-03-11 16:17:52 +03:00
parent c6e045d5ee
commit ebf08ea2ed
2 changed files with 2 additions and 3 deletions

View File

@ -53,8 +53,7 @@ async def follow(_, info, what, slug):
elif what == 'TOPIC':
if not topic_follow(follower.id, slug):
return {"error": "cant follow topic"}
topic_query = select(Topic).where(Topic.slug == slug)
[topic] = get_with_stat(topic_query)
[topic] = get_with_stat(select(Topic).where(Topic.slug == slug))
if not topic:
return {"error": "topic is not found"}
follows = await update_follows_for_author(follower, 'topic', topic, True)

View File

@ -36,8 +36,8 @@ enum ReactionKind {
enum FollowingEntity {
TOPIC
AUTHOR
SHOUT
COMMUNITY
REACTIONS
}
enum InviteStatus {