Lizenzübersicht fix
Dieser Commit ist enthalten in:
@@ -54,15 +54,14 @@ def licenses():
|
||||
filtered_licenses = []
|
||||
|
||||
for license in licenses_list:
|
||||
if license_status == 'active' and license.get('is_active') and license.get('valid_until') and license.get('valid_until') > now:
|
||||
if license_status == 'active' and license.get('is_active'):
|
||||
# Active means is_active=true, regardless of expiration date
|
||||
filtered_licenses.append(license)
|
||||
elif license_status == 'expiring':
|
||||
expiry_threshold = now + timedelta(days=30)
|
||||
if license.get('valid_until') and now < license.get('valid_until') <= expiry_threshold:
|
||||
filtered_licenses.append(license)
|
||||
elif license_status == 'expired' and license.get('valid_until') and license.get('valid_until') <= now:
|
||||
# Expired means past valid_until date, regardless of is_active
|
||||
filtered_licenses.append(license)
|
||||
elif license_status == 'inactive' and not license.get('is_active'):
|
||||
# Inactive means is_active=false, regardless of date
|
||||
filtered_licenses.append(license)
|
||||
|
||||
licenses_list = filtered_licenses
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren