Return true/false instead of 1/0 for lockouts
This commit is contained in:
parent
fa4777732e
commit
8e9855c408
|
@ -361,25 +361,10 @@ class LockoutViewSet(viewsets.ViewSet, List):
|
|||
if member.paused_date: continue
|
||||
|
||||
authorization = {}
|
||||
if member.orientation_date or member.vetted_date:
|
||||
authorization['common'] = 1
|
||||
else:
|
||||
authorization['common'] = 0
|
||||
|
||||
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
|
||||
authorization['common'] = bool(member.orientation_date or member.vetted_date)
|
||||
authorization['lathe'] = bool(member.lathe_cert_date)
|
||||
authorization['mill'] = bool(member.mill_cert_date)
|
||||
authorization['wood'] = bool(member.wood_cert_date)
|
||||
|
||||
active_member_cards[card.card_number] = authorization
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user