Export und Aktion gefixt
Dieser Commit ist enthalten in:
@@ -3192,11 +3192,12 @@ def export_resources():
|
||||
|
||||
# SQL Query mit Filtern
|
||||
query = """
|
||||
SELECT r.id, r.type, r.value, r.status, r.license_id, r.created_at, r.allocated_at,
|
||||
SELECT r.id, r.resource_type, r.resource_value, r.status, r.allocated_to_license,
|
||||
r.created_at, r.status_changed_at,
|
||||
l.license_key, c.name as customer_name, c.email as customer_email,
|
||||
l.type as license_type
|
||||
l.license_type
|
||||
FROM resource_pools r
|
||||
LEFT JOIN licenses l ON r.license_id = l.id
|
||||
LEFT JOIN licenses l ON r.allocated_to_license = l.id
|
||||
LEFT JOIN customers c ON l.customer_id = c.id
|
||||
WHERE 1=1
|
||||
"""
|
||||
@@ -3204,11 +3205,11 @@ def export_resources():
|
||||
|
||||
# Filter für Testdaten
|
||||
if not show_test:
|
||||
query += " AND (l.is_test = false OR l.is_test IS NULL)"
|
||||
query += " AND (r.is_test = false OR r.is_test IS NULL)"
|
||||
|
||||
# Filter für Ressourcentyp
|
||||
if filter_type:
|
||||
query += " AND r.type = %s"
|
||||
query += " AND r.resource_type = %s"
|
||||
params.append(filter_type)
|
||||
|
||||
# Filter für Status
|
||||
@@ -3218,7 +3219,7 @@ def export_resources():
|
||||
|
||||
# Suchfilter
|
||||
if search_query:
|
||||
query += " AND (r.value ILIKE %s OR l.license_key ILIKE %s OR c.name ILIKE %s)"
|
||||
query += " AND (r.resource_value ILIKE %s OR l.license_key ILIKE %s OR c.name ILIKE %s)"
|
||||
params.extend([f'%{search_query}%', f'%{search_query}%', f'%{search_query}%'])
|
||||
|
||||
query += " ORDER BY r.id DESC"
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren