fix: prevent anomaly resolution when resolvedAt is falsey
This commit is contained in:
parent
a5768054ff
commit
1e94640f6e
|
|
@ -62,9 +62,11 @@ export class AnomaliesService {
|
|||
const validatedAnomalies = anomalies.flat();
|
||||
const updatedAnomalies: Anomaly[] = [];
|
||||
for (const anomaly of validatedAnomalies) {
|
||||
updatedAnomalies.push(
|
||||
await this.anomalyService.resolveAnomaly(anomaly.id),
|
||||
);
|
||||
if (anomaly.resolvedAt) {
|
||||
updatedAnomalies.push(
|
||||
await this.anomalyService.resolveAnomaly(anomaly.id),
|
||||
);
|
||||
}
|
||||
}
|
||||
return updatedAnomalies;
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue