forked from CMS/memberPlumbing
Add check for "Account On Hold"
This commit is contained in:
parent
8dd7904c5f
commit
e443380153
@ -87,7 +87,8 @@ def makeMember(member, doorAuth):
|
|||||||
"Email": member["Email"],
|
"Email": member["Email"],
|
||||||
"Phone": member["Phone"]}
|
"Phone": member["Phone"]}
|
||||||
|
|
||||||
if doorAuth:
|
if member[doorAuth] == "Y" \
|
||||||
|
and not member["Account on Hold"] == "Account on Hold":
|
||||||
memberLevel = [v for k, v in memberLevels.items() if member[k] == k]
|
memberLevel = [v for k, v in memberLevels.items() if member[k] == k]
|
||||||
if len(memberLevel) == 1:
|
if len(memberLevel) == 1:
|
||||||
out["Schedule1"] = memberLevel[0]
|
out["Schedule1"] = memberLevel[0]
|
||||||
@ -125,7 +126,7 @@ def makeDoor(doorName, doorIPs, members):
|
|||||||
writer = csv.DictWriter(outString, fieldnames)
|
writer = csv.DictWriter(outString, fieldnames)
|
||||||
writer.writeheader()
|
writer.writeheader()
|
||||||
for member in members:
|
for member in members:
|
||||||
member = makeMember(member, member["Access " + doorName + "?"] != "")
|
member = makeMember(member, "Access " + doorName + "?")
|
||||||
if member is not None:
|
if member is not None:
|
||||||
writer.writerow(member)
|
writer.writerow(member)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user