fix 1
This commit is contained in:
parent
ff7569d4ad
commit
2aabfdc8b4
1 changed files with 4 additions and 2 deletions
|
|
@ -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"):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue