From eb2eb0cc9c5f28b091fdea16148d0bce4c0ea615 Mon Sep 17 00:00:00 2001 From: Vyom-Yadav Date: Thu, 9 Mar 2023 11:56:30 +0530 Subject: [PATCH] [Bug] Update system policies correctly Signed-off-by: Vyom-Yadav --- src/libs/dbHandler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/dbHandler.go b/src/libs/dbHandler.go index ad74830c..64622e32 100644 --- a/src/libs/dbHandler.go +++ b/src/libs/dbHandler.go @@ -142,11 +142,11 @@ var LastSysAlertID int64 = 0 func UpdateOutdatedSystemPolicy(cfg types.ConfigDB, outdatedPolicy string, latestPolicy string) { if cfg.DBDriver == "mysql" { - if err := UpdateOutdatedNetworkPolicyFromMySQL(cfg, outdatedPolicy, latestPolicy); err != nil { + if err := UpdateOutdatedSystemPolicyFromMySQL(cfg, outdatedPolicy, latestPolicy); err != nil { log.Error().Msg(err.Error()) } } else if cfg.DBDriver == "sqlite3" { - if err := UpdateOutdatedNetworkPolicyFromSQLite(cfg, outdatedPolicy, latestPolicy); err != nil { + if err := UpdateOutdatedSystemPolicyFromSQLite(cfg, outdatedPolicy, latestPolicy); err != nil { log.Error().Msg(err.Error()) } }