mirror of
https://github.com/django/django.git
synced 2025-10-28 08:06:09 +00:00
Fixed #11319 - Added lookup support for ForeignKey.to_field. Also reverted no-longer-needed model formsets workaround for lack of such support from r10756. Thanks Russell and Alex for review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15303 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -158,11 +158,9 @@ class CustomPKTests(TestCase):
|
||||
new_bar = Bar.objects.create()
|
||||
new_foo = Foo.objects.create(bar=new_bar)
|
||||
|
||||
# FIXME: This still doesn't work, but will require some changes in
|
||||
# get_db_prep_lookup to fix it.
|
||||
# f = Foo.objects.get(bar=new_bar.pk)
|
||||
# self.assertEqual(f, new_foo)
|
||||
# self.assertEqual(f.bar, new_bar)
|
||||
f = Foo.objects.get(bar=new_bar.pk)
|
||||
self.assertEqual(f, new_foo)
|
||||
self.assertEqual(f.bar, new_bar)
|
||||
|
||||
f = Foo.objects.get(bar=new_bar)
|
||||
self.assertEqual(f, new_foo),
|
||||
|
||||
Reference in New Issue
Block a user