0
0
mirror of https://github.com/django/django.git synced 2024-11-29 22:56:46 +01:00

Refs #26144 -- Used proxy_for_model instead of mro inspection.

This commit is contained in:
Simon Charette 2016-02-05 12:14:32 -05:00
parent f91a04621e
commit 275314512d

View File

@ -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,