Skip to content

Commit

Permalink
style: run ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene committed May 14, 2024
1 parent 7e45cbe commit 75bed92
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/core/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 75bed92

Please sign in to comment.