nostat
Some checks failed
Deploy on push / deploy (push) Failing after 7s

This commit is contained in:
Untone 2025-01-26 18:16:33 +03:00
parent cb990b61a3
commit e17690f27b

View File

@ -187,17 +187,6 @@ async def create_shout(_, info, inp):
except Exception as e: except Exception as e:
logger.warning(f"Error following shout: {e}", exc_info=True) logger.warning(f"Error following shout: {e}", exc_info=True)
# Обновляем статистику автора
try:
author = session.query(Author).filter(Author.id == author_id).first()
if author and author.stat:
author.stat["shouts"] = author.stat.get("shouts", 0) + 1
session.add(author)
session.commit()
await cache_author(author.dict())
except Exception as e:
logger.warning(f"Error updating author stats: {e}", exc_info=True)
logger.info(f"Successfully created shout {shout.id}") logger.info(f"Successfully created shout {shout.id}")
return {"shout": shout} return {"shout": shout}