Skip to content
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

numeric_rule_variable issue for the attributes like "Age" #40

Open
jdsinh opened this issue Jun 27, 2017 · 1 comment
Open

numeric_rule_variable issue for the attributes like "Age" #40

jdsinh opened this issue Jun 27, 2017 · 1 comment

Comments

@jdsinh
Copy link

jdsinh commented Jun 27, 2017

I have records of 100 students on which I apply the rule.

One of the variable is

@numeric_rule_variable
def age(self):
    if self.student.age is not None:
        return self.contact.age
    else:
        return ????

If age is not present in some of the students what should I return in "else: part as this variable expects to return something numerical,

@shubhdunzo
Copy link

You can return -1 or any other negative integer code in else part, and then you can put conditions for this return value.{ "name": age, "operator": greater_than, "value": 0 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants