diff --git a/backend/app/proxmox_templates.py b/backend/app/proxmox_templates.py index 74af850..03a7a10 100644 --- a/backend/app/proxmox_templates.py +++ b/backend/app/proxmox_templates.py @@ -17,7 +17,8 @@ def list_templates() -> dict[str, list[dict]]: if ct.get("template") != 1: continue config = client.nodes(node).lxc(ct["vmid"]).config.get() - lxc_templates.append({"vmid": int(ct["vmid"]), "name": ct.get("name", config.get("hostname", "")), "cores": int(config.get("cores", 1)), "memory_mb": int(config.get("memory", 1024)), "disk_gb": 10, "source_kind": "vmid"}) + ct_vmid = int(ct["vmid"]) + lxc_templates.append({"vmid": ct_vmid, "volid": f"vmid:{ct_vmid}", "name": ct.get("name", config.get("hostname", "")), "cores": int(config.get("cores", 1)), "memory_mb": int(config.get("memory", 1024)), "disk_gb": 10, "source_kind": "vmid"}) for storage in client.nodes(node).storage.get(): if "vztmpl" not in storage.get("content", ""):