From f337718ec69104a6e39f90f55227ca65f920c46e Mon Sep 17 00:00:00 2001 From: Thomas Stallinger Date: Thu, 10 Sep 2026 14:51:54 +0200 Subject: [PATCH] =?UTF-8?q?Ger=C3=A4teliste:=20Workspace-Name=20mitliefern?= =?UTF-8?q?=20(GUI-Umbau)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01VLk93dhDMrkPXefVdknMV9 --- app.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 7d531b1..5ad62b8 100644 --- a/app.py +++ b/app.py @@ -1950,9 +1950,12 @@ def fetch_devices_for_organization(organization_id: str): cur.execute( f""" SELECT d.id, d.hostname, d.device_fingerprint, d.agent_last_checkin, - d.deprovisioned_at, d.oe_id, oe.name, {GERAETE_HEALTH_SPALTEN_SQL} + d.deprovisioned_at, d.oe_id, oe.name, w.name, {GERAETE_HEALTH_SPALTEN_SQL} FROM devices d LEFT JOIN organisationseinheiten oe ON oe.id = d.oe_id + LEFT JOIN assignments a ON a.device_id = d.id + LEFT JOIN bereitstellungsvorlagen bv ON bv.id = a.bereitstellungsvorlage_id + LEFT JOIN workspaces w ON w.id = bv.workspace_id WHERE d.organization_id = %s AND d.archived_at IS NULL ORDER BY d.hostname NULLS LAST, d.created_at """, @@ -1971,10 +1974,17 @@ def fetch_devices_for_organization(organization_id: str): ), "oe_id": str(oe_id) if oe_id is not None else None, "oe_name": oe_name, + # Install-time zugewiesener Workspace (GUI-Umbau + # 10.09.2026, Geräteliste-Spalte) - bei einer nachträglichen + # Gerätegruppen-Workspace-Übersteuerung (ADR-0028) weicht + # der tatsächlich wirksame Katalog davon ab, für den + # genauen Stand siehe der Auftragskatalog-Seite des Geräts. + "workspace_name": workspace_name, **_health_felder_aus_row(*health_spalten), } for ( device_id, hostname, fingerprint, last_checkin, deprovisioned_at, oe_id, oe_name, + workspace_name, *health_spalten, ) in cur.fetchall() ]