create-reaction-unauthorized-handling
All checks were successful
Deploy on push / deploy (push) Successful in 26s

This commit is contained in:
2024-05-18 12:38:46 +03:00
parent c80229b7b9
commit 0f5df77d28
3 changed files with 15 additions and 12 deletions

View File

@@ -94,9 +94,8 @@ def after_reaction_update(mapper, connection, reaction: Reaction):
for author_with_stat in get_with_stat(author_query):
asyncio.create_task(cache_author(author_with_stat.dict()))
shout = connection.execute(
select(Shout).select_from(Shout).where(Shout.id == reaction.shout)
).first()
shout_query = select(Shout).select_from(Shout).where(Shout.id == reaction.shout)
[shout] = connection.execute(shout_query)
if shout:
after_shout_update(mapper, connection, shout)
except Exception as exc: