ssh фикс 3
This commit is contained in:
parent
b6eb46078d
commit
ee83f74fb9
1 changed files with 4 additions and 1 deletions
|
|
@ -44,7 +44,10 @@ async def _emit(task_id: str, message: str, level: str = "info") -> None:
|
|||
async def _resolve_scope(scope: dict) -> list[tuple[Device, Object]]:
|
||||
"""Expand target_scope to a list of (device, parent_object) pairs."""
|
||||
async with AsyncSessionLocal() as db:
|
||||
query = select(Device).options(selectinload(Device.object)).where(Device.is_active == True)
|
||||
query = select(Device).options(
|
||||
selectinload(Device.object).selectinload(Object.ssh_credentials),
|
||||
selectinload(Device.object).selectinload(Object.category_credentials),
|
||||
).where(Device.is_active == True)
|
||||
|
||||
scope_type = scope.get("type")
|
||||
if scope_type == "device":
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue