fix test and failed map access

This commit is contained in:
Héctor Giménez
2024-05-05 13:49:47 +09:00
parent 638f3047f8
commit aff05aa9ed
2 changed files with 20 additions and 3 deletions

View File

@@ -156,7 +156,7 @@ func (r Rule) Evaluate(it data.Item) (RuleResult, error) {
continue
}
if itemTypes, found := blockedStatsForItemType[statName[0]]; found {
if itemTypes, found := blockedStatsForItemType[statName[1]]; found {
if slices.Contains(itemTypes, it.TypeAsString()) {
return RuleResultNoMatch, fmt.Errorf("property %s is not supported for item type %s", statName[0], it.TypeAsString())
}