fix: do not throw error if send empty array
This commit is contained in:
parent
11ed2b89ee
commit
dc32f77a2c
1 changed files with 2 additions and 1 deletions
|
|
@ -869,7 +869,8 @@ export class QuotationActionController extends Controller {
|
|||
if (!quotation) throw relationError("Quotation");
|
||||
if (ids.employee.length !== employee.length) throw relationError("Worker");
|
||||
if (ids.productService.length !== productService.length) throw relationError("Product");
|
||||
if (quotation._count.worker >= (quotation.workerMax || 0)) {
|
||||
if (quotation._count.worker + body.length >= (quotation.workerMax || 0)) {
|
||||
if (body.length === 0) return;
|
||||
throw new HttpError(
|
||||
HttpStatus.PRECONDITION_FAILED,
|
||||
"Worker exceed current quotation max worker.",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue