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)