From 75bed921501935962b26a62b84bca9bdc1796101 Mon Sep 17 00:00:00 2001 From: Mohamed-Hacene Date: Tue, 14 May 2024 13:43:22 +0200 Subject: [PATCH] style: run ruff format --- backend/core/helpers.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/core/helpers.py b/backend/core/helpers.py index 54be81166..c7a7c2a4b 100644 --- a/backend/core/helpers.py +++ b/backend/core/helpers.py @@ -994,7 +994,11 @@ def threats_count_per_name(user: User): # expected by echarts to send the threats names in labels and the count of each threat in values for threat in Threat.objects.filter(id__in=object_ids_view).order_by("name"): - val = RiskScenario.objects.filter(threats=threat).filter(id__in=viewable_scenarios).count() + val = ( + RiskScenario.objects.filter(threats=threat) + .filter(id__in=viewable_scenarios) + .count() + ) if val > 0: labels.append({"name": threat.name}) values.append(val)