From 92a9f36acde31a2ea45bcb3cffb0f53b6cbea2d4 Mon Sep 17 00:00:00 2001 From: Siarhei Siniak Date: Thu, 10 Jul 2025 11:27:58 +0300 Subject: [PATCH] [+] fix not frozen Market rows --- .../fxreader/pr34/test_task_2025_06_30_v1/async_api/app.py | 2 +- .../fxreader/pr34/test_task_2025_06_30_v1/tickers/logic.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deps/test-task-2025-06-30-v1/python/online/fxreader/pr34/test_task_2025_06_30_v1/async_api/app.py b/deps/test-task-2025-06-30-v1/python/online/fxreader/pr34/test_task_2025_06_30_v1/async_api/app.py index 20de15f..5e56c46 100644 --- a/deps/test-task-2025-06-30-v1/python/online/fxreader/pr34/test_task_2025_06_30_v1/async_api/app.py +++ b/deps/test-task-2025-06-30-v1/python/online/fxreader/pr34/test_task_2025_06_30_v1/async_api/app.py @@ -39,7 +39,7 @@ async def run() -> None: session, [ Ticker( - id=markets[rate.symbol].id, + id=markets[rate.symbol], timestamp=timestamp, value=rate.value, ) diff --git a/deps/test-task-2025-06-30-v1/python/online/fxreader/pr34/test_task_2025_06_30_v1/tickers/logic.py b/deps/test-task-2025-06-30-v1/python/online/fxreader/pr34/test_task_2025_06_30_v1/tickers/logic.py index 7a9f268..80ecf75 100644 --- a/deps/test-task-2025-06-30-v1/python/online/fxreader/pr34/test_task_2025_06_30_v1/tickers/logic.py +++ b/deps/test-task-2025-06-30-v1/python/online/fxreader/pr34/test_task_2025_06_30_v1/tickers/logic.py @@ -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