Kaydet (Commit) 27531451 authored tarafından Simon Charette's avatar Simon Charette

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

üst f91a0462
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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment