[+] fix not frozen Market rows

This commit is contained in:
Siarhei Siniak 2025-07-10 11:27:58 +03:00
parent 070a63222c
commit 92a9f36acd
2 changed files with 4 additions and 4 deletions

@ -39,7 +39,7 @@ async def run() -> None:
session,
[
Ticker(
id=markets[rate.symbol].id,
id=markets[rate.symbol],
timestamp=timestamp,
value=rate.value,
)

@ -7,8 +7,8 @@ from .utils import get_or_create
async def markets_get_by_symbol(
session: 'async_sessionmaker[AsyncSession]',
symbols: set[str],
) -> dict[str, Market]:
res : dict[str, Market] = dict()
) -> dict[str, int]:
res : dict[str, int] = dict()
async with session() as active_session:
async with active_session.begin() as transaction:
@ -18,7 +18,7 @@ async def markets_get_by_symbol(
Market,
name=o,
))[0]
res[o] = m
res[o] = m.id
return res