Commit 32a5bcc8 by Alex Gaynor

Fix

parent aef86c2b
...@@ -184,6 +184,6 @@ def _get_subclasses(model): ...@@ -184,6 +184,6 @@ def _get_subclasses(model):
subclasses = [model] subclasses = [model]
for f in model._meta.get_all_field_names(): for f in model._meta.get_all_field_names():
field = model._meta.get_field_by_name(f)[0] field = model._meta.get_field_by_name(f)[0]
if isinstance(field, RelatedObject) and getattr(field.field.rel, "parent_link"): if isinstance(field, RelatedObject) and getattr(field.field.rel, "parent_link", None):
subclasses.extend(_get_subclasses(field.model)) subclasses.extend(_get_subclasses(field.model))
return subclasses return subclasses
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 sign in to comment