#29067 closed Bug (fixed)
QuerySet.values_list(..., flat=True) combined with .annotate() incorrectly includes the annotate columns
| Reported by: | Jon Dufresne | Owned by: | nobody |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | 2.0 |
| Severity: | Release blocker | Keywords: | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Regression introduced in Django 2.0.
In FlatValuesListIterable.__iter__(), can't assume the returned rows have a single column as using .annotate() may have added additional columns to the SELECT.
Introduction bisected to commit 4dfd6b88d520b43b6363946e5ee58ba14cd1efe6.
Change History (5)
comment:1 by , 8 years ago
| Has patch: | set |
|---|
comment:2 by , 8 years ago
| Triage Stage: | Unreviewed → Ready for checkin |
|---|
comment:3 by , 8 years ago
| Severity: | Normal → Release blocker |
|---|
Note:
See TracTickets
for help on using tickets.
https://github.com/django/django/pull/9623