#29396: Using date__year comparisons together with OuterRef causes an IndexError
-------------------------------------+-------------------------------------
     Reporter:  Dmitry Shachnev      |                    Owner:  Windson
                                     |  yang
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Windson yang):

 Please tell me if I'm doing wrong, Just like
 [https://github.com/django/django/blob/master/django/db/models/lookups.py#L517
 YearExact], We should adding the same try-except block to handle when
 rhs_params[0] doesn't exist.  In the except part, should we just raise an
 error like below? Or we have to overwrite GreaterThanOrEqual and
 LessThanOrEqual class?


 {{{
     raise ValueError(
                     'The QuerySet value for an exact lookup must be
 limited to '
                     'one result using slicing.'
                 )
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29396#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.e1634f8dcd388685fcbb27f15a5794cd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to