From d360c69cec30bd5339c8e214b62c87d4be071794 Mon Sep 17 00:00:00 2001 From: austnv Date: Sun, 14 Jun 2026 23:44:27 +0300 Subject: [PATCH] del squad_uuids from tariffs --- routers/tariffs.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/routers/tariffs.py b/routers/tariffs.py index 17d021a..d051cc0 100644 --- a/routers/tariffs.py +++ b/routers/tariffs.py @@ -9,7 +9,12 @@ router = APIRouter(prefix='/api/v1', tags=['tariffs']) async def get_tariffs_from_file(): async with aiofiles.open('data/tariffs.json', 'r', encoding='utf-8') as f: content = await f.read() - return json.loads(content) # <- блокирующая операция, но с маленьким контентом + кэш + data = json.loads(content) # <- блокирующая операция, но с маленьким контентом + кэш + + # Удаляем squad_uuids + for tariff in data.get('tariffs', []): + tariff.pop('squad_uuids', None) + return data @router.get('/tariffs') async def get_tariffs():