-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for is_in operator #86
base: master
Are you sure you want to change the base?
Conversation
business_rules/operators.py
Outdated
@@ -95,6 +95,10 @@ def matches_regex(self, regex): | |||
def non_empty(self): | |||
return bool(self.value) | |||
|
|||
@type_operator(FIELD_TEXT) | |||
def contains_in(self, other_string): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about just "is_in"? Contains_in isnt't really a thing people say.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, it really fits what we are trying to do
@@ -96,7 +96,7 @@ def non_empty(self): | |||
return bool(self.value) | |||
|
|||
@type_operator(FIELD_TEXT) | |||
def contains_in(self, other_string): | |||
def is_in(self, other_string): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You really need a substring option? Or are you intending this to be about membership in a list of things?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
substring option
@jfalkenstein Do you know who maintains this repo? |
Currently, this Rules Engine has the support to check if the value has the other string. There are use cases where a person may want to see if the value is part of the other string.