Aufraeumen: Schulcomputer Basis entfernt, Workspace-Liste mit Freigabe-Namen
Testprofile von Default Lab und WLAN-Test zeigen auf die Vorlagen Schulcomputer (Mint/Debian/Ubuntu) derselben Distro, die Basis-Workspaces entfallen (Migration 0054). fetch_workspaces() liefert die Namen der freigegebenen Kundengruppen/Organisationen fuer Anzeigen wie "Vorlage fuer Schulen". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1288097927
commit
f4c306e389
2 files changed
+43
-2
No files matched your search
@@ -3099,7 +3099,13 @@ def fetch_workspaces():
|
||||
(SELECT max(nummer) FROM workspace_versionen v
|
||||
WHERE v.workspace_id = w.id AND v.status = 'veroeffentlicht'),
|
||||
EXISTS (SELECT 1 FROM workspace_versionen v
|
||||
WHERE v.workspace_id = w.id AND v.status = 'entwurf')
|
||||
WHERE v.workspace_id = w.id AND v.status = 'entwurf'),
|
||||
ARRAY(SELECT k.name FROM workspace_freigabe_kundengruppen f
|
||||
JOIN kundengruppen k ON k.id = f.kundengruppe_id
|
||||
WHERE f.workspace_id = w.id ORDER BY k.sort_order),
|
||||
ARRAY(SELECT o2.name FROM workspace_freigabe_organisationen f
|
||||
JOIN organizations o2 ON o2.id = f.organization_id
|
||||
WHERE f.workspace_id = w.id ORDER BY o2.name)
|
||||
FROM workspaces w
|
||||
LEFT JOIN organizations o ON o.id = w.organization_id
|
||||
LEFT JOIN backends b ON b.id = w.backend_id
|
||||
@@ -3122,11 +3128,14 @@ def fetch_workspaces():
|
||||
"sichtbarkeit": sichtbarkeit,
|
||||
"version": version,
|
||||
"hat_entwurf": hat_entwurf,
|
||||
# Für Anzeigen wie "Vorlage für Schulen" (07.10.2026)
|
||||
"freigabe_kundengruppen": list(kundengruppen_namen),
|
||||
"freigabe_organisationen": list(organisationen_namen),
|
||||
}
|
||||
for (
|
||||
wid, key, name, description, organization_id, organization_name,
|
||||
backend_id, backend_name, backend_version, ist_vorlage, sichtbarkeit,
|
||||
version, hat_entwurf,
|
||||
version, hat_entwurf, kundengruppen_namen, organisationen_namen,
|
||||
) in cur.fetchall()
|
||||
]
|
||||
|
||||
|
||||
Reference in new issue
Block a user