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
This commit is contained in:
Adam Goldsmith 2021-07-01 12:14:24 -04:00
parent 34539eb630
commit f94a27699c

View File

@ -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(