Skip to content

Commit c23d6a5

Browse files
authored
Bugfix: details page includes group
Not happening with details_full though (because for loop tainted argument). Signed-off-by: Matthias Büchse <[email protected]>
1 parent 098b0e7 commit c23d6a5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

compliance-monitor/monitor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ async def get_detail(
661661
rows2.extend(db_get_relevant_results2(cur, subj, scopeuuid, approved_only=True))
662662
results2 = convert_result_rows_to_dict2(
663663
rows2, get_scopes(), include_report=True, grace_period_days=GRACE_PERIOD_DAYS,
664-
subjects=(subject, ), scopes=(scopeuuid, ),
664+
subjects=subjects, scopes=(scopeuuid, ),
665665
)
666666
title = f'Details for group {group}' if group else f'Details for subject {subject}'
667667
return render_view(
@@ -681,10 +681,10 @@ async def get_detail_full(
681681
with conn.cursor() as cur:
682682
group, subjects = _resolve_group(cur, subject)
683683
rows2 = []
684-
for subject in subjects:
685-
rows2.extend(db_get_relevant_results2(cur, subject, scopeuuid, approved_only=False))
684+
for subj in subjects:
685+
rows2.extend(db_get_relevant_results2(cur, subj, scopeuuid, approved_only=False))
686686
results2 = convert_result_rows_to_dict2(
687-
rows2, get_scopes(), include_report=True, subjects=(subject, ), scopes=(scopeuuid, ),
687+
rows2, get_scopes(), include_report=True, subjects=subjects, scopes=(scopeuuid, ),
688688
)
689689
title = f'Details for group {group}' if group else f'Details for subject {subject}'
690690
return render_view(

0 commit comments

Comments
 (0)