FIX(api): correct WorkloadHostFixedResource field access in _enrich_host_data

Previous code accessed resource.resource_type and resource.quantity which
never existed on WorkloadHostFixedResource. The correct fields are type,
model, manufacturer and physical_address, matching the model definition
and DB schema since the initial migration.

Bug introduced  in 1731e2c.
This commit is contained in:
2026-04-22 07:53:44 +05:45
parent bb357fcbd1
commit bbf71012ea
+4 -2
View File
@@ -142,8 +142,10 @@ def _enrich_host_data(host: WorkloadHost):
fixed_resources_data.append({
"id": str(resource.id),
"name": resource.name,
"resource_type": resource.resource_type,
"quantity": resource.quantity
"resource_type": resource.type,
"model": resource.model,
"manufacturer": resource.manufacturer,
"physical_address": resource.physical_address,
})
# Combine host data with resources