From 17d0bd151265eb284c93350a3ede632b2b23b835 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Fri, 21 Jul 2006 17:11:13 +0000 Subject: Fixed a bunch of spurious imports, typos, and other small errors turned up by a pass through PyFlakes. This covers about the first third of the errors. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3411 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/serializers/python.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django/core/serializers/python.py') diff --git a/django/core/serializers/python.py b/django/core/serializers/python.py index 7989e1d469..4181bc7f2b 100644 --- a/django/core/serializers/python.py +++ b/django/core/serializers/python.py @@ -79,7 +79,7 @@ def Deserializer(object_list, **options): elif field.rel and isinstance(field.rel, models.ManyToOneRel): try: data[field.name] = field.rel.to._default_manager.get(pk=field_value) - except RelatedModel.DoesNotExist: + except field.rel.to.DoesNotExist: data[field.name] = None # Handle all other fields -- cgit v1.3