#21182: Extra Column in Group By When Using date_trunc
-------------------------------------+-------------------------------------
     Reporter:  anonymous            |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  1.5
  (models, ORM)                      |               Resolution:  needsinfo
     Severity:  Normal               |             Triage Stage:
     Keywords:                       |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by shai):

 For anyone who looks at this later:

 The query produced includes `ORDER BY "finance_transaction"."date" DESC`,
 which hints that the user's Transaction model has a meta
 `ordering=["-date"]`; if this is the case, the date field is
 '''correctly''' added to the group-by, to allow this ordering. Ordering by
 month instead should solve the problem.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21182#comment:3>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.6ade563ff731db9a023c02672a5de663%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to