From f94a27699c77aa36c00f33f895fdf5e3ef545a89 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Thu, 1 Jul 2021 12:14:24 -0400 Subject: [PATCH] Remove limited operations check, but keep staffed hours temporarily We are returning to normal operating hours, but have a grace period during which we will keep the staffed hours as well --- memberPlumbing/doorUpdater.py | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/memberPlumbing/doorUpdater.py b/memberPlumbing/doorUpdater.py index e17040a..cbbd8e4 100755 --- a/memberPlumbing/doorUpdater.py +++ b/memberPlumbing/doorUpdater.py @@ -73,15 +73,6 @@ class MembershipworksMember(Member): self.credentials = set() self.onHold = data["Account on Hold"] != "" - self.limitedOperations = ( - data[ - "Access Permitted Using Membership Level Schedule During COVID-19 Limited Operations" - ] - == "Y" - ) - self.staffedLimitedOperations = ( - data["Access Permitted During COVID-19 Staffed Period Only"] == "Y" - ) self.formerMember = formerMember levels = {k: v for k, v in config.memberLevels.items() if data[k] == k} @@ -106,13 +97,10 @@ class MembershipworksMember(Member): schedules = [] if door.name in self.doorAccess and not self.onHold and not self.formerMember: - # members should get their normal schedules - if self.limitedOperations or "CMS Staff" in self.levels: - schedules = self.schedules + doorLevels + schedules = self.schedules + doorLevels - # members should get only the staffed hours schedule - if self.staffedLimitedOperations: - schedules += ["Staffed Hours"] + # add staffed hours, for a temporary grace period + schedules += ["Staffed Hours"] dm = DoorMember( door, @@ -133,7 +121,6 @@ class MembershipworksMember(Member): return ( super().__str__() + f"""OnHold? {self.onHold} -Limited Operations Access? {self.limitedOperations} Former Member? {self.formerMember} """ ) @@ -342,7 +329,7 @@ def main(): config = Config() membershipworks = config.membershipworks membershipworks_attributes = ( - "_id,nam,phn,eml,lvl,lbl,xws,xms,xsc,xas,xfd,xac,xcf,xeh,xse,xlo,xxc" + "_id,nam,phn,eml,lvl,lbl,xws,xms,xsc,xas,xfd,xac,xcf,xeh,xse" ) memberData = membershipworks.get_members(