Skip to content

Commit 34b4bb1

Browse files
Apply suggestions from code review
Fix typo in the "build_count_subquery" docstring Co-authored-by: valentijnscholten <valentijnscholten@gmail.com>
1 parent 63d682c commit 34b4bb1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

dojo/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2674,8 +2674,8 @@ def parse_cvss_data(cvss_vector_string: str) -> dict:
26742674

26752675

26762676
def build_count_subquery(model_qs: QuerySet, group_field: str) -> Subquery:
2677-
"""Return a Subquery that yields one aggregated count per test_id."""
2677+
"""Return a Subquery that yields one aggregated count per `group_field`."""
26782678
return Subquery(
2679-
model_qs.values(group_field).annotate(c=Count("*")).values("c")[:1], # one row per test_id
2679+
model_qs.values(group_field).annotate(c=Count("*")).values("c")[:1], # one row per group_field
26802680
output_field=IntegerField(),
26812681
)

0 commit comments

Comments
 (0)