Fix: slaid is missing error (#2077)

In order to reproduce this you need to create a Service and an SLO. The
bug appears when an SLO is not set.


Fixes #1784
This commit is contained in:
Zoltán Bedi
2025-09-15 20:11:59 +02:00
committed by GitHub
parent c35fc5c41e
commit 9089067e03
2 changed files with 8 additions and 0 deletions

View File

@@ -670,6 +670,9 @@ export class Zabbix implements ZabbixConnector {
}
const slaIds = slas.map((s) => s.slaid);
if (slaIds.length === 0) {
return [];
}
if (slaIds.length > 1) {
const sliQueries = slaIds?.map((slaId) => this.zabbixAPI.getSLI(slaId, itServiceIds, timeRange, options));
const results = await Promise.all(sliQueries);