diff options
| author | Joseph Kocherhans <joseph@jkocherhans.com> | 2010-02-23 16:09:39 +0000 |
|---|---|---|
| committer | Joseph Kocherhans <joseph@jkocherhans.com> | 2010-02-23 16:09:39 +0000 |
| commit | 10b187144169b93ab913d90d218fe4cbfbf507bf (patch) | |
| tree | e94dcd69a861bcff1ac0c05603e0698e99fdc309 | |
| parent | 06a880f7305e589cc1d50f145fe55faeda94f9a8 (diff) | |
Fixed #12888. Fixed a typo in some related object error messages. Thanks, nessita.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12532 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/db/models/fields/related.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py index a9d178a16c..8329792f17 100644 --- a/django/db/models/fields/related.py +++ b/django/db/models/fields/related.py @@ -227,7 +227,7 @@ class SingleRelatedObjectDescriptor(object): value._state.db = router.db_for_write(value.__class__, instance=instance) elif value._state.db is not None and instance._state.db is not None: if not router.allow_relation(value, instance): - raise ValueError('Cannot assign "%r": instance is on database "%s", value is is on database "%s"' % + raise ValueError('Cannot assign "%r": instance is on database "%s", value is on database "%s"' % (value, instance._state.db, value._state.db)) # Set the value of the related field to the value of the related object's related field @@ -299,7 +299,7 @@ class ReverseSingleRelatedObjectDescriptor(object): value._state.db = router.db_for_write(value.__class__, instance=instance) elif value._state.db is not None and instance._state.db is not None: if not router.allow_relation(value, instance): - raise ValueError('Cannot assign "%r": instance is on database "%s", value is is on database "%s"' % + raise ValueError('Cannot assign "%r": instance is on database "%s", value is on database "%s"' % (value, instance._state.db, value._state.db)) # If we're setting the value of a OneToOneField to None, we need to clear @@ -521,7 +521,7 @@ def create_many_related_manager(superclass, rel=False): for obj in objs: if isinstance(obj, self.model): if not router.allow_relation(obj, self.instance): - raise ValueError('Cannot add "%r": instance is on database "%s", value is is on database "%s"' % + raise ValueError('Cannot add "%r": instance is on database "%s", value is on database "%s"' % (obj, self.instance._state.db, obj._state.db)) new_ids.add(obj.pk) elif isinstance(obj, Model): |
