Skip to content

Commit

Permalink
SPM-2163: fix cache invalidation after upload
Browse files Browse the repository at this point in the history
  • Loading branch information
psegedy committed Aug 1, 2023
1 parent 3e79cc3 commit 716506b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion evaluator/evaluate.go
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,8 @@ func parseVmaasJSON(system *models.SystemPlatform) (vmaas.UpdatesV3Request, erro
func invalidateCaches(orgID string) error {
err := database.Db.Model(models.RhAccount{}).
Where("org_id = ?", orgID).
Updates(models.RhAccount{ValidPackageCache: false, ValidAdvisoryCache: false}).
// use map because struct updates only non-zero values and we need to update it to `false`
Updates(map[string]interface{}{"valid_package_cache": false, "valid_advisory_cache": false}).
Error
return err
}
Expand Down

0 comments on commit 716506b

Please sign in to comment.