diff options
author | Anssi Kääriäinen <anssi.kaariainen@thl.fi> | 2016-02-02 11:33:09 +0200 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2016-04-29 13:06:32 -0400 |
commit | 7f51876f99851fdc3fef63aecdfbcffa199c26b9 (patch) | |
tree | 9b2fc6cda60771d699c85a5259ba80b120417fcd /django/core/serializers/python.py | |
parent | dac075e9103ba961af4f70b4011616daa72985d4 (diff) | |
download | django-7f51876f99851fdc3fef63aecdfbcffa199c26b9.tar.gz |
Fixed #26207 -- Replaced dynamic classes with non-data descriptors for deferred instance loading.
Diffstat (limited to 'django/core/serializers/python.py')
-rw-r--r-- | django/core/serializers/python.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/django/core/serializers/python.py b/django/core/serializers/python.py index 94a0272729..7a61999f15 100644 --- a/django/core/serializers/python.py +++ b/django/core/serializers/python.py @@ -37,8 +37,7 @@ class Serializer(base.Serializer): self._current = None def get_dump_object(self, obj): - model = obj._meta.proxy_for_model if obj._deferred else obj.__class__ - data = OrderedDict([('model', force_text(model._meta))]) + data = OrderedDict([('model', force_text(obj._meta))]) if not self.use_natural_primary_keys or not hasattr(obj, 'natural_key'): data["pk"] = force_text(obj._get_pk_val(), strings_only=True) data['fields'] = self._current |