Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def flagger(rule, rules_conditions):
- flag = True
- flag &= rules_conditions['appointment_type'] in rule['appointmentType']
- flag &= rules_conditions['dgt_type'] in rule['dmgType']
- flag &= rules_conditions['origin'] in rule['destinationType'] or rules_conditions['destination'] in rule['destinationType']
- flag &= rules_conditions['volume'] is None or rule['volMin'] == '' or rules_conditions['volume'] >= rule['volMin']
- flag &= rules_conditions['volume'] is None or rule['volMax'] == '' or rules_conditions['volume'] <= rule['volMax']
- return flag
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement