Ticket #2921: deserialize_null.diff
File deserialize_null.diff, 645 bytes (added by , 18 years ago) |
---|
-
django/core/serializers/python.py
a b def Deserializer(object_list, **options) 76 76 m2m_data[field.name] = field.rel.to._default_manager.in_bulk(field_value).values() 77 77 78 78 # Handle FK fields 79 elif field.rel and isinstance(field.rel, models.ManyToOneRel) :79 elif field.rel and isinstance(field.rel, models.ManyToOneRel) and field_value!=None: 80 80 try: 81 81 data[field.name] = field.rel.to._default_manager.get(pk=field_value) 82 82 except field.rel.to.DoesNotExist: