Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #10157: correctly set the related objects pk when assigning a r…

…everse OneToOne. Thanks, dgouldin.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10224 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 02e56530c561e624bd2bee94a5d2ac0fabdfaa54 1 parent 657eefb
Jacob Kaplan-Moss authored March 30, 2009
4  django/db/models/fields/related.py
@@ -210,8 +210,8 @@ def __set__(self, instance, value):
2  tests/modeltests/one_to_one/models.py
@@ -79,6 +79,8 @@ def __unicode__(self):
79 79
 <Restaurant: Ace Hardware the restaurant>
80 80
 >>> r.place
81 81
 <Place: Ace Hardware the place>
  82
+>>> p2.id
  83
+2
82 84
 
83 85
 # Set the place back again, using assignment in the reverse direction.
84 86
 >>> p1.restaurant = r

0 notes on commit 02e5653

Please sign in to comment.
Something went wrong with that request. Please try again.