doorUpdater: Add member level to Custom1 field

This commit is contained in:
Adam Goldsmith 2018-05-14 10:50:58 -04:00
parent 0d95865c8b
commit 5f30998131

View File

@ -93,11 +93,13 @@ def makeMember(member, doorAuth):
if member[doorAuth] == "Y" \ if member[doorAuth] == "Y" \
and not member["Account on Hold"] == "Account on Hold": and not member["Account on Hold"] == "Account on Hold":
memberLevel = [v for k, v in memberLevels.items() if member[k] == k] memberLevel = [(k, v) for k, v in memberLevels.items() if member[k] == k]
if len(memberLevel) == 1: if len(memberLevel) == 1:
out["Schedule1"] = memberLevel[0] out["Custom1"] = memberLevel[0][0].replace("&", "and")
out["Schedule1"] = memberLevel[0][1]
else: else:
print(member["First Name"], member["Last Name"], "has no/too many member levels!") print(member["First Name"], member["Last Name"],
"has no/too many member levels!")
return out return out