fix: add implied exception comp to item for single item variant

When adding an implied "in" comparison to an exception using the
single value form, add it to item, not items.

This fixes #1984.

Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
This commit is contained in:
Mark Stemm
2022-04-26 13:54:31 -07:00
committed by poiana
parent 990a8fd6d5
commit e909babe20

View File

@@ -152,7 +152,7 @@ static void validate_exception_info(
if (!ex.comps.is_valid())
{
ex.comps.is_list = false;
ex.comps.items.push_back({false, "in"});
ex.comps.item = "in";
}
THROW(ex.comps.is_list, "Rule exception item "
+ ex.name + ": fields and comps must both be strings");