Skip to content

Commit

Permalink
Refs #26144 -- Used proxy_for_model instead of mro inspection.
Browse files Browse the repository at this point in the history
  • Loading branch information
charettes committed Feb 5, 2016
1 parent f91a046 commit 2753145
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions django/core/management/commands/dumpdata.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import inspect
import warnings
from collections import OrderedDict

Expand Down Expand Up @@ -142,7 +141,7 @@ def get_objects(count_only=False):
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,
Expand Down

0 comments on commit 2753145

Please sign in to comment.