mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-24 15:25:43 +00:00
fix(BE): improve product and warehouse existence check in adjustment service
This commit is contained in:
@@ -72,6 +72,11 @@ func (s productWarehouseService) GetAll(c *fiber.Ctx, params *validation.Query)
|
||||
s.Log.Errorf("Failed to get productWarehouses: %+v", err)
|
||||
return nil, 0, err
|
||||
}
|
||||
|
||||
if len(productWarehouses) == 0 {
|
||||
return nil, 0, fiber.NewError(fiber.StatusNotFound, "ProductWarehouses not found")
|
||||
}
|
||||
|
||||
return productWarehouses, total, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user