From 2aabfdc8b4f78c330d010b11d7a8fded3c8a59f7 Mon Sep 17 00:00:00 2001 From: dv Date: Tue, 7 Apr 2026 17:40:17 +0300 Subject: [PATCH] fix 1 --- backend/app/routers/tasks.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/app/routers/tasks.py b/backend/app/routers/tasks.py index c0f5874..bba75b3 100644 --- a/backend/app/routers/tasks.py +++ b/backend/app/routers/tasks.py @@ -70,9 +70,11 @@ async def _resolve_labels(db: AsyncSession, tasks: list[Task]) -> dict[str, str] elif kind == "device": labels[t.id] = devs.get(scope.get("id"), f"Устройство #{scope.get('id')}") elif kind == "rack": - labels[t.id] = f"Стойка: {rack_names.get(scope.get('id'), f'#{scope.get(\"id\")}')}" + _rid = scope.get('id') + labels[t.id] = f"Стойка: {rack_names.get(_rid, f'#{_rid}')}" elif kind == "zone": - labels[t.id] = f"Зона: {zone_names.get(scope.get('id'), f'#{scope.get(\"id\")}')}" + _zid = scope.get('id') + labels[t.id] = f"Зона: {zone_names.get(_zid, f'#{_zid}')}" elif kind in ("category", "role"): val = scope.get("value", "?") if oid := scope.get("object_id"):