diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-03-30 22:38:19 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2009-03-30 22:38:19 +0000 |
| commit | 02e56530c561e624bd2bee94a5d2ac0fabdfaa54 (patch) | |
| tree | c8373aad8dbb6fb3d31bffbe62f924cdbe7ac191 /tests | |
| parent | 657eefbf2551bc322c5d5cd8ea64ebe245964aed (diff) | |
Fixed #10157: correctly set the related objects pk when assigning a reverse OneToOne. Thanks, dgouldin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10224 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/modeltests/one_to_one/models.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/modeltests/one_to_one/models.py b/tests/modeltests/one_to_one/models.py index 20ac7a5573..e25e33bcc0 100644 --- a/tests/modeltests/one_to_one/models.py +++ b/tests/modeltests/one_to_one/models.py @@ -79,6 +79,8 @@ DoesNotExist: Restaurant matching query does not exist. <Restaurant: Ace Hardware the restaurant> >>> r.place <Place: Ace Hardware the place> +>>> p2.id +2 # Set the place back again, using assignment in the reverse direction. >>> p1.restaurant = r |
