Skip to content
This repository was archived by the owner on Nov 8, 2024. It is now read-only.

Commit 061fb5a

Browse files
authored
[bugfix] Make rule eval case-sensitive (#49)
1 parent 5fac100 commit 061fb5a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

eppo_client/rules.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ def evaluate_condition(
5656
re.search(condition.value, str(subject_value))
5757
)
5858
elif condition.operator == OperatorType.ONE_OF:
59-
return isinstance(condition.value, list) and str(subject_value).lower() in [
60-
str(value).lower() for value in condition.value
59+
return isinstance(condition.value, list) and str(subject_value) in [
60+
str(value) for value in condition.value
6161
]
6262
elif condition.operator == OperatorType.NOT_ONE_OF:
63-
return isinstance(condition.value, list) and str(
64-
subject_value
65-
).lower() not in [str(value).lower() for value in condition.value]
63+
return isinstance(condition.value, list) and str(subject_value) not in [
64+
str(value) for value in condition.value
65+
]
6666
else:
6767
# Numeric operator: value could be numeric or semver.
6868
if isinstance(subject_value, numbers.Number):

eppo_client/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "3.1.2"
1+
__version__ = "3.1.3"

0 commit comments

Comments
 (0)