Remove payment info again

Valentin Ochs 2023-01-09 20:49:51 +01:00
parent 000b481745
commit 798e4c0f23
1 changed files with 1 additions and 6 deletions

View File

@ -39,7 +39,7 @@ class DoorControlNfc(util.Loggable):
l = [s.strip() for s in line.split('|')]
if len(l) == 6:
if not l[0].strip().startswith('#'):
token, name, organization, email, valid_thru, paid = l
token, name, organization, email, valid_thru = l
try:
if len(valid_thru.strip()) > 0:
valid_thru = datetime.date.fromisoformat(valid_thru)
@ -56,7 +56,6 @@ class DoorControlNfc(util.Loggable):
'organization': organization,
'email': email,
'valid_thru': valid_thru,
'paid': paid.strip().lower() == 'yes'
}
else:
self._logger().warning(f"Skipping line {i} ({line}) since it does not contain exactly 6 data field")
@ -105,10 +104,6 @@ class DoorControlNfc(util.Loggable):
authorized = datetime.date.today() <= data['valid_thru']
if not authorized:
self._logger().info(f"Expired token: {token} of {data['name']}")
elif not data['paid']:
authorized = datetime.date.today() <= datetime.date(2023, 3, 1)
if not authorized:
self._logger().info(f"Unpaid token: {token} of {data['name']}")
else:
authorized = True