#31377: Django 3.0: "GROUP BY" clauses error with tricky field annotation -------------------------------------+------------------------------------- Reporter: Holovashchenko | Owner: Hasan Vadym | Ramezani Type: Bug | Status: assigned Component: Database layer | Version: 3.0 (models, ORM) | Severity: Release blocker | Resolution: Keywords: group by, postgres, | Triage Stage: Accepted annotate | Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by Hasan Ramezani):
* has_patch: 0 => 1 Comment: Simon, I've created a patch to fix this problem. I think the collision, in this case, is between `C.status` and the status annotation. if we remove `c_count=Count("c")` from the query we won't have the error. So, I created a `Book1` test model in my patch to simulate the query. -- Ticket URL: <https://code.djangoproject.com/ticket/31377#comment:4> 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 view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.086f7bb7f4d05482d0f715acdd365e2c%40djangoproject.com.