Advertisement
Guest User

flagger

a guest
Feb 25th, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. def flagger(rule, rules_conditions):
  2.     flag = True
  3.     flag &= rules_conditions['appointment_type'] in rule['appointmentType']
  4.     flag &= rules_conditions['dgt_type'] in rule['dmgType']
  5.     flag &= rules_conditions['origin'] in rule['destinationType'] or rules_conditions['destination'] in rule['destinationType']
  6.     flag &= rules_conditions['volume'] is None or rule['volMin'] == '' or rules_conditions['volume'] >= rule['volMin']
  7.     flag &= rules_conditions['volume'] is None or rule['volMax'] == '' or rules_conditions['volume'] <= rule['volMax']
  8.     return flag
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement