diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2008-08-28 19:38:56 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2008-08-28 19:38:56 +0000 |
| commit | 9f59fc5560ae4ae1d6b73996393caae2314fd414 (patch) | |
| tree | ff8d988afc95deae7bab58c7856520607808bf6f /django/core/serializers/python.py | |
| parent | 195420259a5286cbeface8ef7d0570e5e8d651e0 (diff) | |
Fixed #8651: correctly deserialize objects with 0 for pk/fk.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8676 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/serializers/python.py')
| -rw-r--r-- | django/core/serializers/python.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/serializers/python.py b/django/core/serializers/python.py index c129c068df..0eeb485797 100644 --- a/django/core/serializers/python.py +++ b/django/core/serializers/python.py @@ -84,7 +84,7 @@ def Deserializer(object_list, **options): # Handle FK fields elif field.rel and isinstance(field.rel, models.ManyToOneRel): - if field_value: + if field_value is not None: data[field.attname] = field.rel.to._meta.get_field(field.rel.field_name).to_python(field_value) else: data[field.attname] = None |
