1 |
## Script (Python) "isEligable" |
## Script (Python) "isEligable" |
2 |
##bind container=container |
##bind container=container |
3 |
##bind context=context |
##bind context=context |
4 |
##bind namespace= |
##bind namespace= |
5 |
##bind script=script |
##bind script=script |
6 |
##bind subpath=traverse_subpath |
##bind subpath=traverse_subpath |
7 |
##parameters=action,member |
##parameters=action,member |
8 |
##title= |
##title= |
9 |
## |
## |
10 |
|
|
11 |
true=1 |
true=1 |
12 |
false=0 |
false=0 |
13 |
|
|
14 |
country = None |
if action.getCountry() != []: |
|
party = None |
|
|
us_state = None |
|
|
|
|
|
if action.getCountry() != ['']: |
|
15 |
if member.getProperty('country') not in action.getCountry(): |
if member.getProperty('country') not in action.getCountry(): |
16 |
return false |
return false |
17 |
|
|
18 |
if action.getUsState() != ['']: |
if action.getUsState() != []: |
19 |
if member.getProperty('us_state') not in action.getUsState(): |
if member.getProperty('us_state') not in action.getUsState(): |
20 |
return false |
return false |
21 |
|
|
22 |
if action.getPoliticalParty() != ['']: |
if action.getPoliticalParty() != []: |
23 |
if member.getProperty('stat_party') not in action.getPoliticalParty(): |
if member.getProperty('stat_party') not in action.getPoliticalParty(): |
24 |
return false |
return false |
25 |
|
|
26 |
return true |
return true |
27 |
|
|