Hi Mikołaj,

On 4 April 2011 19:46, trybik <[email protected]> wrote:
> Omg, I've just reviewed this bug, it's still there but this message is
> completely confusing. A little correction:

It's best to report bugs on the tracker. Otherwise, they'll die in
infinite depths of everyone's mailboxes.

>
> On 25 Lut, 14:14, trybik <[email protected]> wrote:
>> Hi,
>>
>> when generating sql forWhereNoderepresented as (AND:
>> (EverythingNode)), 
>> inhttp://code.djangoproject.com/browser/django/trunk/django/db/models/s...
>> the empty variable will stay False,
>
> True of course (L88), not False... the point is that L105 will never
> be reached because of treacherous 'continue' in L113.
>
>> thus throwing the EmptyResultSet
>> further on (L120) and in consequence e.g. returning EmptyQuerySet on
>> higher level. Imvho, in case of FullResultSet handling you're missing
>> setting empty variable to True
>
> and here False, not True (between L104 and L105); removing L113 would
> also do the trick in this case.

It's still not very clear to me what problem are you describing. If
you could produce a queryset that generates wrong SQL, it would
clearify things.

>> How one can get (AND: (EverythingNode))WhereNodeto be 
>> generated?http://code.djangoproject.com/browser/django/trunk/django/db/models/s...

Good question. You can see it's generated in combine()[1], but I'm not
sure how you can make a Query object with "self.where" attribute that
would evaluate to False.

[1]: 
http://code.djangoproject.com/browser/django/trunk/django/db/models/sql/query.py#L478

-- 
Łukasz Rekucki

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to