Lizenzübersicht fix

Dieser Commit ist enthalten in:
2025-06-22 15:52:30 +02:00
Ursprung ce03b90a96
Commit 9982f14d1e
2 geänderte Dateien mit 4 neuen und 6 gelöschten Zeilen

Datei anzeigen

@@ -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