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:
@@ -142,8 +142,10 @@ def _enrich_host_data(host: WorkloadHost):
|
|||||||
fixed_resources_data.append({
|
fixed_resources_data.append({
|
||||||
"id": str(resource.id),
|
"id": str(resource.id),
|
||||||
"name": resource.name,
|
"name": resource.name,
|
||||||
"resource_type": resource.resource_type,
|
"resource_type": resource.type,
|
||||||
"quantity": resource.quantity
|
"model": resource.model,
|
||||||
|
"manufacturer": resource.manufacturer,
|
||||||
|
"physical_address": resource.physical_address,
|
||||||
})
|
})
|
||||||
|
|
||||||
# Combine host data with resources
|
# Combine host data with resources
|
||||||
|
|||||||
Reference in New Issue
Block a user