Skip to content

Commit 551ce8e

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

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
@@ -2675,8 +2675,8 @@ def tag_validator(value: str | list[str], exception_class: Callable = Validation
26752675

26762676

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

0 commit comments

Comments
 (0)