#23739: django 1.7.1 defer() throws AttributeError when using related_name
-------------------------------------+-------------------------------------
Reporter: farhan85 | Owner: nobody
Type: | Status: new
Cleanup/optimization | Version: 1.7
Component: Database layer | Resolution:
(models, ORM) | Triage Stage: Accepted
Severity: Normal | Needs documentation: 0
Keywords: defer related_name | Patch needs improvement: 0
AttributeError RelatedObject rel | UI/UX: 0
Has patch: 0 |
Needs tests: 0 |
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Comment (by akaariai):
I'm confused. Using `[o for o in
ModelA.objects.filter(name='').select_related('model_b').defer('model_b__name')]`
gives me RelatedObject has no attribute rel in 1.5. Just as it does using
master. And, `[o for o in
ModelB.objects.filter(name='').select_related('model_a').defer('model_a__name').iterator()]`
works on master.
--
Ticket URL: <https://code.djangoproject.com/ticket/23739#comment:5>
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/066.d79920e13e865685ef121987062ff39b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.