fix: include parent_part_number in BOM API response

BOMEntryResponse was missing the ParentPartNumber field. The database
query populates it correctly, but the API serialization dropped it.
This caused the Calc extension to never populate the hidden
_silo_parent_pn column during pull, so push never called
_update_bom_relationship and no BOM entries were created.
This commit is contained in:
Forbes
2026-02-01 14:24:35 -06:00
parent 73e6b813f4
commit b1256a7044

View File

@@ -19,6 +19,7 @@ import (
// BOMEntryResponse represents a BOM entry in API responses.
type BOMEntryResponse struct {
ID string `json:"id"`
ParentPartNumber string `json:"parent_part_number"`
ChildPartNumber string `json:"child_part_number"`
ChildDescription string `json:"child_description"`
RelType string `json:"rel_type"`
@@ -424,6 +425,7 @@ func bomEntryToResponse(e *db.BOMEntry) BOMEntryResponse {
}
return BOMEntryResponse{
ID: e.RelationshipID,
ParentPartNumber: e.ParentPartNumber,
ChildPartNumber: e.ChildPartNumber,
ChildDescription: e.ChildDescription,
RelType: e.RelType,