vasuporov / snapboard

Automatically exported from code.google.com/p/snapboard
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

queryset filter order isn't correct. #16

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Snapboard revision 166, django revision 4828.

Getting this revision to work in my project.  I ran a validate on the
models and got the following error:

> python manage.py validate snapboard
snapboard: non-keyword arg after keyword arg (managers.py, line 44)
1 error found.

Looking at the lines of code, I dug into the Q objects for queries and
found this:

Lookup functions can mix the use of Q objects and keyword arguments. All
arguments provided to a lookup function (be they keyword arguments or Q
objects) are “AND”ed together. However, if a Q object is provided, it must
precede the definition of any keyword arguments.

So I refactored the order and it worked.  

Patch attached:

Original issue reported on code.google.com by johnnie....@gmail.com on 5 Apr 2007 at 7:31

Attachments:

GoogleCodeExporter commented 8 years ago
patched. please confirm

Original comment by bs1...@gmail.com on 12 Apr 2007 at 8:55

GoogleCodeExporter commented 8 years ago
Verified against rev 168.

Original comment by johnnie....@gmail.com on 12 Apr 2007 at 9:59