module architecture/ formatting

This commit is contained in:
Vladless
2025-07-31 23:42:45 +03:00
parent de61c04f4a
commit 1565ec4820
30 changed files with 261 additions and 148 deletions
+2 -9
View File
@@ -1158,15 +1158,8 @@ async def process_user_search(
else:
referrer_text = f"\n🤝 Пригласил: <b>{referrer_tg_id}</b>"
stmt = (
select(
func.count(Payment.id),
func.sum(Payment.amount)
)
.where(
Payment.status == "success",
Payment.tg_id == tg_id
)
stmt = select(func.count(Payment.id), func.sum(Payment.amount)).where(
Payment.status == "success", Payment.tg_id == tg_id
)
result = await session.execute(stmt)
topups_amount, topups_sum = result.one_or_none() or (0, 0.0)