rez_core 2.2.42 → 2.2.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Inject, Injectable } from '@nestjs/common';
|
|
1
|
+
import { BadGatewayException, Inject, Injectable } from '@nestjs/common';
|
|
2
2
|
import { EntityServiceImpl } from 'src/module/meta/service/entity-service-impl.service';
|
|
3
3
|
import { StageGroupRepository } from '../repository/stage-group.repository';
|
|
4
4
|
import { BaseEntity } from 'src/module/meta/entity/base-entity.entity';
|
|
@@ -76,6 +76,13 @@ export class StageGroupService extends EntityServiceImpl {
|
|
|
76
76
|
},
|
|
77
77
|
});
|
|
78
78
|
|
|
79
|
+
if (stageMovementData.length === 0) {
|
|
80
|
+
throw new BadGatewayException(
|
|
81
|
+
`No lead found with id ${lead_id} or no stage movements recorded for this lead
|
|
82
|
+
`,
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
79
86
|
// 5. Map: stage_id => movement data
|
|
80
87
|
const stageMovementMap = new Map<number, any>();
|
|
81
88
|
for (const movement of stageMovementData) {
|