From e443380153df424d8c60cc5babf4f2694aac1cc6 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Tue, 8 May 2018 20:27:32 -0400 Subject: [PATCH] Add check for "Account On Hold" --- doorUpdater.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doorUpdater.py b/doorUpdater.py index cd40662..50a2bd8 100644 --- a/doorUpdater.py +++ b/doorUpdater.py @@ -87,7 +87,8 @@ def makeMember(member, doorAuth): "Email": member["Email"], "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] if len(memberLevel) == 1: out["Schedule1"] = memberLevel[0] @@ -125,7 +126,7 @@ def makeDoor(doorName, doorIPs, members): writer = csv.DictWriter(outString, fieldnames) writer.writeheader() for member in members: - member = makeMember(member, member["Access " + doorName + "?"] != "") + member = makeMember(member, "Access " + doorName + "?") if member is not None: writer.writerow(member)