On 4 April 2011 19:46, trybik <mikolaj....@gmail.com> 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 <mikolaj.rybin...@gmail.com> 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
No, you don't get to do this.
If it's too much hassle for you to open a ticket, then it's too much
hassle for us to work with you.
We have thousands of people all with their own patches, feature
requests, and support needs. We're going to prioritize the ones who
are willing to meet us halfway, help out, and don't place demands on
our volunteer time.
Jacob