#27800: Crash with QuerySet.annotate(Length(...)).distinct()
-------------------------------------+-------------------------------------
Reporter: Lex | Owner: nobody
Berezhny |
Type: Bug | Status: new
Component: Database | Version: 1.11
layer (models, ORM) |
Severity: Release | Keywords:
blocker |
Triage Stage: Accepted | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
After 3b2db6ec12ce7d4b32f60dd7713e5f23cac498b7, this query for
`test/annotations/` crashes with `AttributeError: 'IntegerField' object
has no attribute 'model'`.
{{{
Employee.objects.annotate(
name_len=Length('first_name'),
).distinct('name_len').values_list('name_len', flat=True)
}}}
[https://github.com/django/django/pull/8003 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/27800>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.92853d32c5be43e05157a30f151bd634%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.