diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2013-04-18 17:16:39 +0100 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2013-04-18 17:16:39 +0100 |
| commit | 7f3678dc4cd7146c49bac3fb8f5211f647636aa3 (patch) | |
| tree | fdd2a60ccd1a9a3162d89f970db44502e35a3b3f /django/core/serializers/python.py | |
| parent | b62e82365ad56ca930f7abb1d1dbdf9ce5a7c7c3 (diff) | |
| parent | 93c1576f17f6c5ee73f94f8de007f3c33010dc81 (diff) | |
Merge branch 'master' into schema-alteration
Conflicts:
django/db/backends/__init__.py
django/db/backends/mysql/base.py
django/db/backends/oracle/base.py
django/db/backends/oracle/creation.py
django/db/backends/postgresql_psycopg2/base.py
django/db/backends/sqlite3/base.py
django/db/models/fields/related.py
Diffstat (limited to 'django/core/serializers/python.py')
| -rw-r--r-- | django/core/serializers/python.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/serializers/python.py b/django/core/serializers/python.py index 37fa906280..cdfac5044b 100644 --- a/django/core/serializers/python.py +++ b/django/core/serializers/python.py @@ -88,7 +88,7 @@ def Deserializer(object_list, **options): for d in object_list: # Look up the model and starting build a dict of data for it. Model = _get_model(d["model"]) - data = {Model._meta.pk.attname: Model._meta.pk.to_python(d["pk"])} + data = {Model._meta.pk.attname: Model._meta.pk.to_python(d.get("pk", None))} m2m_data = {} model_fields = Model._meta.get_all_field_names() @@ -143,7 +143,7 @@ def Deserializer(object_list, **options): def _get_model(model_identifier): """ - Helper to look up a model from an "app_label.module_name" string. + Helper to look up a model from an "app_label.model_name" string. """ try: Model = models.get_model(*model_identifier.split(".")) |
