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

Commit

Permalink
[bugfix] Make rule eval case-sensitive (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
schmit authored Jun 5, 2024
1 parent 5fac100 commit 061fb5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions eppo_client/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ def evaluate_condition(
re.search(condition.value, str(subject_value))
)
elif condition.operator == OperatorType.ONE_OF:
return isinstance(condition.value, list) and str(subject_value).lower() in [
str(value).lower() for value in condition.value
return isinstance(condition.value, list) and str(subject_value) in [
str(value) for value in condition.value
]
elif condition.operator == OperatorType.NOT_ONE_OF:
return isinstance(condition.value, list) and str(
subject_value
).lower() not in [str(value).lower() for value in condition.value]
return isinstance(condition.value, list) and str(subject_value) not in [
str(value) for value in condition.value
]
else:
# Numeric operator: value could be numeric or semver.
if isinstance(subject_value, numbers.Number):
Expand Down
2 changes: 1 addition & 1 deletion eppo_client/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.1.2"
__version__ = "3.1.3"

0 comments on commit 061fb5a

Please sign in to comment.