Update logic for key_expired toggle on Users page

This commit is contained in:
iFargle
2023-02-10 12:20:50 +09:00
parent cec895bd0f
commit e22b9fd6f0

View File

@@ -484,12 +484,12 @@ def build_preauth_key_table(user_name):
key_expired = True if expiration_parse < local_time else False
expiration_time = str(expiration_parse.strftime('%A %m/%d/%Y, %H:%M:%S'))+" "+str(timezone)
# Class for the javascript function to look for to toggle the hide function
hide_expired = "expired-row" if not key_usable else ""
key_usable = False
if key["reusable"] and not key_expired: key_usable = True
if not key["reusable"] and not key["used"] and not key_expired: key_usable = True
# Class for the javascript function to look for to toggle the hide function
hide_expired = "expired-row" if not key_usable else ""
tooltip_expired = "Expiration: "+expiration_time