From c3aea7b76b05584e20ac9edbcae12121b988707a Mon Sep 17 00:00:00 2001 From: Lord Hepipud Date: Thu, 2 Sep 2021 13:18:30 +0200 Subject: [PATCH] Fixes component filtering for snapshots --- lib/core/repository/Get-IcingaComponentList.psm1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/core/repository/Get-IcingaComponentList.psm1 b/lib/core/repository/Get-IcingaComponentList.psm1 index 69e95e6..894df36 100644 --- a/lib/core/repository/Get-IcingaComponentList.psm1 +++ b/lib/core/repository/Get-IcingaComponentList.psm1 @@ -45,7 +45,11 @@ function Get-IcingaComponentList() $ComponentData | Add-Member -MemberType NoteProperty -Name 'Location' -Value $package.Location; $ComponentData | Add-Member -MemberType NoteProperty -Name 'Snapshot' -Value $package.Snapshot; - if ($Snapshot -And $package.Snapshot -eq $FALSE) { + if ($package.Snapshot -And $Snapshot -eq $FALSE) { + continue; + } + + if ($package.Snapshot -eq $FALSE -And $Snapshot) { continue; }