#18056: query_set.dates('field_name', 'years') does not return distinct elements
-------------------------------------+-------------------------------------
Reporter: framazz@… | Owner: nmfm
Type: Bug | Status: closed
Component: Database layer | Version: 1.3
(models, ORM) | Resolution: fixed
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by Anssi Kääriäinen <akaariai@…>):
* status: new => closed
* resolution: => fixed
Comment:
In [bebbbb7af096ecffc0d7585617fdfacb196bc7c2]:
{{{
#!CommitTicketReference repository=""
revision="bebbbb7af096ecffc0d7585617fdfacb196bc7c2"
Fixed #18056 - Cleared aggregations on DateQuery.add_date_select
Cleared aggregations on add_date_select method so only distinct dates
are returned when dealing with a QuerySet that contained aggregations.
That would cause the query set to return repeated dates because it
would look for distinct (date kind, aggregation) pairs.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/18056#comment:8>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.