jruizgit / rules

Durable Rules Engine
MIT License
1.15k stars 206 forks source link

[python] I'm not sure how to deal with the 'null' attributes... #351

Closed alxfed closed 4 years ago

alxfed commented 4 years ago

[python] Everything is fine about your rules engine, but I'm not sure how to deal with the situations when I have some attributes in a message that may (sporadically) have a 'null'/None value and your engine refuses to process it. Any suggestions? Or should I always make sure that there are just no keys with values == None/null in the dictionary that I pass to your engine as a message? Or is there a way to write a rule that would detect this value (I haven't found any)?

alxfed commented 4 years ago

ok. you are not answering. {key: value for key, value in message.items() if value is not None} did the job.