Commit d7f0eb42 authored by Nigel Kukard's avatar Nigel Kukard

An undefined value shouldn't cause a negative match result

We may or may not have a candidate attribute, if we don't we should just
ignore it rather than count it towards a negative match.
parent b654180b
......@@ -3647,14 +3647,15 @@ sub _resolve_pool_override
# Loop with the attributes and check for a full match
foreach my $attr (POOL_OVERRIDE_MATCH_ATTRIBUTES) {
# If this attribute in the pool override is set, then lets check it
if (defined($poolOverride->{$attr}) && $poolOverride->{$attr} ne "") {
# Check for match or mismatch
if (defined($candidate->{$attr}) && $candidate->{$attr} eq $poolOverride->{$attr}) {
$numMatches++;
} else {
$numMismatches++;
# Check for match or mismatch, only if candidate attribute is defined
if (defined($candidate->{$attr})) {
if ($candidate->{$attr} eq $poolOverride->{$attr}) {
$numMatches++;
} else {
$numMismatches++;
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment