summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2016-02-05 12:14:32 -0500
committerSimon Charette <charette.s@gmail.com>2016-02-05 12:14:32 -0500
commit275314512d7dd10065026f02f61931e4c62c9cc8 (patch)
tree485d42cc07ac828d270c37c03be57bdc90b874eb
parentf91a04621ea8d7a657ff755645d823026257e898 (diff)
Refs #26144 -- Used proxy_for_model instead of mro inspection.
-rw-r--r--django/core/management/commands/dumpdata.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/django/core/management/commands/dumpdata.py b/django/core/management/commands/dumpdata.py
index 69c80ff09f..222d1c6f94 100644
--- a/django/core/management/commands/dumpdata.py
+++ b/django/core/management/commands/dumpdata.py
@@ -1,4 +1,3 @@
-import inspect
import warnings
from collections import OrderedDict
@@ -142,7 +141,7 @@ class Command(BaseCommand):
for model in models:
if model in excluded_models:
continue
- if model._meta.proxy and inspect.getmro(model)[1] not in models:
+ if model._meta.proxy and model._meta.proxy_for_model not in models:
warnings.warn(
"%s is a proxy model and won't be serialized." % model._meta.label,
category=ProxyModelWarning,