#11750: ManyToMany field does not respect Proxy models
---------------------------------------------------+------------------------
Reporter: mxposed | Owner: nobody
Status: closed | Milestone:
Component: Database layer (models, ORM) | Version: 1.1
Resolution: worksforme | Keywords: manytomany
proxy
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Comment (by emulbreh):
There's an error in my test: `a_set` should point to `User`. But still not
reproducible.
{{{
#!python
import unittest
from django.db import models
from django.contrib.auth.models import User
class A(User):
class Meta:
proxy=True
class B(models.Model):
a_set = models.ManyToManyField(User)
class T11750(unittest.TestCase):
def test_11750(self):
user = User.objects.create(username="foo")
a = A.objects.get()
b = B.objects.create()
b.a_set.add(a)
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/11750#comment:2>
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
-~----------~----~----~----~------~----~------~--~---