From 5f30998131e42982ecbccf87855f647dd5ea8e37 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Mon, 14 May 2018 10:50:58 -0400 Subject: [PATCH] doorUpdater: Add member level to Custom1 field --- doorUpdater.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doorUpdater.py b/doorUpdater.py index d30553f..14343f9 100755 --- a/doorUpdater.py +++ b/doorUpdater.py @@ -93,11 +93,13 @@ def makeMember(member, 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 = [(k, v) for k, v in memberLevels.items() if member[k] == k] if len(memberLevel) == 1: - out["Schedule1"] = memberLevel[0] + out["Custom1"] = memberLevel[0][0].replace("&", "and") + out["Schedule1"] = memberLevel[0][1] 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