I think your patch will do the trick, but maybe the problem should be
solved in the "source" of the problem.
Instead of removing empty IN's, it would be better if they don't show
up at all.
I tried a fix myself but it didn't worked:
django/db/models/query.py
# ...
def get_where_clause(lookup_ty
If you're talking about what I think you're talking about - I've
posted a patch to this a while ago.
http://code.djangoproject.com/ticket/2519
No unit test attached to it, anyone want to do the part that I was too
lazy to do? :)
vic
On 8/24/06, Enrico <[EMAIL PROTECTED]> wrote:
>
> Hi Jacob,
Hi Jacob,
I've just updated to revision 3654.
I was trying to populate a context with two different lists of news
entries. The second list shouldn't display entries already shown in the
first, so I used exclude with 'id__in' to separate the results.
Also, I'm using a custom manager to show only
On Aug 23, 2006, at 8:27 AM, Enrico wrote:
> I realized that using the IN field lookup with an empty list, it
> generates a SQL error (at least on MySQL).
> [snip]
> Any thoughts?
I *thought* this was fixed in trunk; what version of Django are you
running?
If you are on trunk, posting the code
Hi,
I realized that using the IN field lookup with an empty list, it
generates a SQL error (at least on MySQL).
Maybe the lookup could check if the list is empty before writing the
SQL condition.
I know that I could the check myself before applying the filter, but
doing directly on the DB api c
5 matches
Mail list logo