Return true/false instead of 1/0 for lockouts

This commit is contained in:
Tanner Collin 2020-06-05 02:52:53 +00:00
parent fa4777732e
commit 8e9855c408

View File

@ -361,25 +361,10 @@ class LockoutViewSet(viewsets.ViewSet, List):
if member.paused_date: continue if member.paused_date: continue
authorization = {} authorization = {}
if member.orientation_date or member.vetted_date: authorization['common'] = bool(member.orientation_date or member.vetted_date)
authorization['common'] = 1 authorization['lathe'] = bool(member.lathe_cert_date)
else: authorization['mill'] = bool(member.mill_cert_date)
authorization['common'] = 0 authorization['wood'] = bool(member.wood_cert_date)
if member.lathe_cert_date:
authorization['lathe'] = 1
else:
authorization['lathe'] = 0
if member.mill_cert_date:
authorization['mill'] = 1
else:
authorization['mill'] = 0
if member.wood_cert_date:
authorization['wood'] = 1
else:
authorization['wood'] = 0
active_member_cards[card.card_number] = authorization active_member_cards[card.card_number] = authorization