#13155: Iteration of a Many To Many Relationship raises Field Error
---------------------------------------------------+------------------------
Reporter: callen | Owner: nobody
Status: reopened | Milestone:
Component: Database layer (models, ORM) | Version: 1.1
Resolution: | Keywords: m2m, orm,
field error
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Comment (by kmtracey):
What is the variable bimport? Guessing the obvious -- that it is an
instance of Bimport -- I cannot recreate the problem:
{{{
>>> from ttt.models import Bimport
>>> bimport = Bimport.objects.all()[0]
>>> bimport.newsletters.all()
[<Newsletter: Newsletter object>]
>>> import django
>>> django.get_version()
u'1.2 beta 1 SVN-12805'
>>> for nl in bimport.newsletters.all():
... print nl.name
...
first
>>>
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/13155#comment:5>
Django <http://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 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-updates?hl=en.