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

[bugfix] Make rule eval case-sensitive #49

Merged
merged 2 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Loading