Author: jkocherhans
Date: 2010-02-23 10:09:39 -0600 (Tue, 23 Feb 2010)
New Revision: 12532

Modified:
   django/trunk/django/db/models/fields/related.py
Log:
Fixed #12888. Fixed a typo in some related object error messages. Thanks, 
nessita.

Modified: django/trunk/django/db/models/fields/related.py
===================================================================
--- django/trunk/django/db/models/fields/related.py     2010-02-23 15:27:36 UTC 
(rev 12531)
+++ django/trunk/django/db/models/fields/related.py     2010-02-23 16:09:39 UTC 
(rev 12532)
@@ -227,7 +227,7 @@
                 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 @@
                 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 @@
                 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):

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to