DuVale / django-voting

Automatically exported from code.google.com/p/django-voting
Other
0 stars 0 forks source link

get_scores_in_bulk() broken with django svn (1.1) #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
With recent django SVN, get_scores_in_bulk explodes when it calls
queryset.query.group_by.append().  group_by is apparently now None by default.

I tried briefly to repair that by setting group_by to [] if it was None,
but that didn't work, and rather than attempting to continue to debug this
particular code path, I decided to use django's new aggregate functions
instead where they were available.  

The attached patch seems to work -- at least it doesn't explode -- but I
haven't run much data through it.  Note that it should continue to work as
before in Django 1.0.X.

(Also, this fixes the largely cosmetic problem in issue 18.)

Original issue reported on code.google.com by jsmull...@gmail.com on 31 Mar 2009 at 5:46

Attachments:

GoogleCodeExporter commented 9 years ago
Wow, that patch should definitely be considered supreme over mine.  Works for 
me with 
pinax-dev 0.7b2 and django-trunk.  Thanks a lot

Original comment by skylar.s...@gmail.com on 5 Jun 2009 at 9:35

GoogleCodeExporter commented 9 years ago
This fixes the issue for me on Django 1.1 beta 1 SVN-10763. Thanks for the 
patch!
Let's hope it makes it into SVN soon.

Original comment by graham_g...@gkgk.org on 5 Jun 2009 at 10:39

GoogleCodeExporter commented 9 years ago
Any chance this will get merged into trunk?

Original comment by cope...@gmail.com on 6 Jul 2009 at 9:47

GoogleCodeExporter commented 9 years ago
Fixed in r70.

Original comment by bros...@gmail.com on 26 Aug 2009 at 6:13