Fixed #49 : working

This commit is contained in:
2021-03-18 18:18:19 +01:00
parent e1a0b2f46e
commit 6a8011ec12
3 changed files with 144 additions and 14 deletions
+12 -5
View File
@@ -1,4 +1,5 @@
import ast
import re
from dataclasses import dataclass
from typing import Union
@@ -1317,12 +1318,18 @@ def get_rete_conditions(*conditions_as_string):
res = []
for as_string in conditions_as_string:
parts = as_string.split("|")
identifier = get_value(parts[0])
attribute = parts[1]
value = get_value(parts[2])
if as_string.startswith("$"):
fn_match = re.match(r"(?P<function>\w+)\s?\((?P<args>.+)\)", as_string[1:])
as_dict = fn_match.groupdict()
pass
else:
parts = as_string.split("|")
identifier = get_value(parts[0])
attribute = parts[1]
value = get_value(parts[2])
res.append(Condition(identifier, attribute, value))
res.append(Condition(identifier, attribute, value))
return AndConditions(res)