From cef0a2e15746b895b52d04a58894ff3ff74c0771 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Tue, 1 Aug 2023 13:13:51 +0200 Subject: [PATCH] Fix app filter returning all items in case of wrong app, #1597 --- pkg/zabbix/methods.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/zabbix/methods.go b/pkg/zabbix/methods.go index 9f110b2..840b05a 100644 --- a/pkg/zabbix/methods.go +++ b/pkg/zabbix/methods.go @@ -150,7 +150,7 @@ func (ds *Zabbix) GetItemsBefore54( var allItems []*Item if len(appids) > 0 { allItems, err = ds.GetAllItems(ctx, nil, appids, itemType, showDisabled, "") - } else if len(hostids) > 0 { + } else if appFilter == "" && len(hostids) > 0 { allItems, err = ds.GetAllItems(ctx, hostids, nil, itemType, showDisabled, "") }