fix result removal for DELETION requests
@@ -136,13 +136,14 @@ func HandleValidation(
return false, getEnforceFailureErrorMsg(engineResponses)
}
- prInfos := policyreport.GeneratePRsFromEngineResponse(engineResponses, logger)
- prGenerator.Add(prInfos...)
-
if request.Operation == v1beta1.Delete {
prGenerator.Add(buildDeletionPrInfo(oldR))
+ return true, ""
}
+ prInfos := policyreport.GeneratePRsFromEngineResponse(engineResponses, logger)
+ prGenerator.Add(prInfos...)
+
return true, ""
}
