Skip to content

Commit c91be95

Browse files
authored
Merge pull request #105 from jeyrschabu/fixeclude
fix(handler): Fixing bug on excluding a candidate
2 parents 2ac20cf + 50254a3 commit c91be95

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

swabbie-core/src/main/kotlin/com/netflix/spinnaker/swabbie/AbstractResourceTypeHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ abstract class AbstractResourceTypeHandler<T : Resource>(
323323
var shouldSkip = false
324324
val candidate = candidates.find { it.resourceId == r.resourceId }
325325
if ((candidate == null || candidate.getViolations().isEmpty()) ||
326-
shouldExcludeResource(candidates.first(), workConfiguration, optedOutResourceStates, Action.DELETE)) {
326+
shouldExcludeResource(candidate, workConfiguration, optedOutResourceStates, Action.DELETE)) {
327327
shouldSkip = true
328328
ensureResourceUnmarked(r, workConfiguration)
329329
}

0 commit comments

Comments
 (0)