From c23d6a57cf53200cfe528803a20ef1bd38ef5fa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20B=C3=BCchse?= Date: Sat, 5 Jul 2025 08:23:44 +0200 Subject: [PATCH] Bugfix: details page includes group MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not happening with details_full though (because for loop tainted argument). Signed-off-by: Matthias Büchse --- compliance-monitor/monitor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compliance-monitor/monitor.py b/compliance-monitor/monitor.py index 8ef4d0f6d..bf133435f 100755 --- a/compliance-monitor/monitor.py +++ b/compliance-monitor/monitor.py @@ -661,7 +661,7 @@ async def get_detail( rows2.extend(db_get_relevant_results2(cur, subj, scopeuuid, approved_only=True)) results2 = convert_result_rows_to_dict2( rows2, get_scopes(), include_report=True, grace_period_days=GRACE_PERIOD_DAYS, - subjects=(subject, ), scopes=(scopeuuid, ), + subjects=subjects, scopes=(scopeuuid, ), ) title = f'Details for group {group}' if group else f'Details for subject {subject}' return render_view( @@ -681,10 +681,10 @@ async def get_detail_full( with conn.cursor() as cur: group, subjects = _resolve_group(cur, subject) rows2 = [] - for subject in subjects: - rows2.extend(db_get_relevant_results2(cur, subject, scopeuuid, approved_only=False)) + for subj in subjects: + rows2.extend(db_get_relevant_results2(cur, subj, scopeuuid, approved_only=False)) results2 = convert_result_rows_to_dict2( - rows2, get_scopes(), include_report=True, subjects=(subject, ), scopes=(scopeuuid, ), + rows2, get_scopes(), include_report=True, subjects=subjects, scopes=(scopeuuid, ), ) title = f'Details for group {group}' if group else f'Details for subject {subject}' return render_view(