#32848: Bad error with invalid lookup on annotated field.
------------------------------------------+------------------------
               Reporter:  Gordon Wrigley  |          Owner:  nobody
                   Type:  Uncategorized   |         Status:  new
              Component:  Uncategorized   |        Version:  3.2
               Severity:  Normal          |       Keywords:
           Triage Stage:  Unreviewed      |      Has patch:  0
    Needs documentation:  0               |    Needs tests:  0
Patch needs improvement:  0               |  Easy pickings:  0
                  UI/UX:  0               |
------------------------------------------+------------------------
 This on Django 3.1.12 with Postgres and Python 3.8.6

 (This is a little contrived)

 `MyModel.objects.annotate(bob=F("my_duration")).values("bob")`

 works fine, then if we add a bad lookup

 `MyModel.objects.annotate(bob=F("my_duration")).values("bob__fred")`

 we get an error saying "Cannot resolve keyword 'bob' into field." which is
 a misleading error.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32848>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.dada70cf24efc4ef88a375d0bf591475%40djangoproject.com.

Reply via email to