Leaklens

django__django-15375

aggregate() with 'default' after annotate() crashes.

Verdict: the issue points to the file or function that was changed (Tier B).

This issue should be fixed by: django/db/models/aggregates.py diff --git a/django/db/models/aggregates.py b/django/db/models/aggregates.py index 8c4eae7906..e4c81547c1 100644 a b class Aggregate(Func): 6565 if hasattr(default, 'resolve_expression'): 6666 default = default.resolve_expression(query, allow_joins, reuse, summarize) 6767 c.default = None # Reset the default argument before wrapping. 68 return Coalesce(c, default, output_field=c._output_field_or_none) 68 coalesce = Coalesce(c, default, output_field=c._output_field_or_none) 69 coalesce.is_summary = True 70 return coalesce

The two checks disagreed (stated fix vs. points to it); the lower reading shown: “This issue should be fixed by: django/db/models/aggregates.py diff --git a/django/db/models/aggregates.py b/django/db/models/aggregates.py index 8c4e…”

All SWE-bench Verified tasks · more django/django tasks · How the check works