mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
FIX[BE]: fixing error on report marketing dto
This commit is contained in:
@@ -302,6 +302,16 @@ func (p ProductRelationDTOFixed) MarshalJSON() ([]byte, error) {
|
||||
Suppliers []supplierDTO.SupplierRelationDTO `json:"suppliers"`
|
||||
}
|
||||
|
||||
suppliers := make([]supplierDTO.SupplierRelationDTO, len(p.ProductRelationDTO.Suppliers))
|
||||
for i, ps := range p.ProductRelationDTO.Suppliers {
|
||||
suppliers[i] = supplierDTO.SupplierRelationDTO{
|
||||
Id: ps.Id,
|
||||
Name: ps.Name,
|
||||
Alias: ps.Alias,
|
||||
Category: ps.Category,
|
||||
}
|
||||
}
|
||||
|
||||
return json.Marshal(&Alias{
|
||||
Id: p.ProductRelationDTO.Id,
|
||||
Name: p.ProductRelationDTO.Name,
|
||||
@@ -310,6 +320,6 @@ func (p ProductRelationDTOFixed) MarshalJSON() ([]byte, error) {
|
||||
Uom: p.ProductRelationDTO.Uom,
|
||||
Flags: p.ProductRelationDTO.Flags,
|
||||
ProductCategory: p.ProductRelationDTO.ProductCategory,
|
||||
Suppliers: p.ProductRelationDTO.Suppliers,
|
||||
Suppliers: suppliers,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user