Merge branch 'fix/nonstock-undefined-field' into 'development'

fix(be): nonstock response supplier null to empty array

See merge request mbugroup/lti-api!120
This commit is contained in:
Hafizh A. Y.
2025-12-30 23:57:54 +00:00
@@ -101,7 +101,7 @@ func ToNonstockDetailDTO(e entity.Nonstock) NonstockDetailDTO {
func toNonstockSupplierDTOs(relations []entity.NonstockSupplier) []supplierDTO.SupplierRelationDTO {
if len(relations) == 0 {
return nil
return make([]supplierDTO.SupplierRelationDTO, 0)
}
result := make([]supplierDTO.SupplierRelationDTO, 0, len(relations))
@@ -113,7 +113,7 @@ func toNonstockSupplierDTOs(relations []entity.NonstockSupplier) []supplierDTO.S
}
if len(result) == 0 {
return nil
return make([]supplierDTO.SupplierRelationDTO, 0)
}
return result