Skip to content

Commit

Permalink
[Bug] Update system policies correctly
Browse files Browse the repository at this point in the history
Signed-off-by: Vyom-Yadav <[email protected]>
  • Loading branch information
Vyom-Yadav committed Mar 9, 2023
1 parent 4bb4ca0 commit eb2eb0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libs/dbHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
}
Expand Down

0 comments on commit eb2eb0c

Please sign in to comment.