From 85cc60291818d1b782e8f6ff493fb6b036e0f3be Mon Sep 17 00:00:00 2001 From: Manuel Reinhardt Date: Wed, 20 Nov 2024 16:37:44 +0100 Subject: [PATCH] Fix query for unanswered risks Ref syslabcom/scrum#2800 --- docs/changes.rst | 3 +++ src/euphorie/client/model.py | 10 +++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/changes.rst b/docs/changes.rst index 56f702243..f22de2ea3 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -10,6 +10,9 @@ Changelog - Action Plan: Strip HTML from comments (`#2763 `_) [reinhardt] +- Report: Fix “parked” risks + (`#2800 `_) + [reinhardt] 16.2.3 (2024-10-25) diff --git a/src/euphorie/client/model.py b/src/euphorie/client/model.py index cc527e291..ebc2c4db0 100644 --- a/src/euphorie/client/model.py +++ b/src/euphorie/client/model.py @@ -1909,13 +1909,9 @@ def _SKIPPED_MODULE_factory(): UNANSWERED_RISKS_FILTER = sql.and_( SurveyTreeItem.type == "risk", - sql.exists( - sql.select([Risk.sql_risk_id]).where( - sql.and_( - Risk.sql_risk_id == SurveyTreeItem.id, - Risk.identification == None, # noqa: E711 - ) - ) + sql.and_( + Risk.sql_risk_id == SurveyTreeItem.id, + Risk.identification == None, # noqa: E711 ), )