Commit 8cbf7280 by Alex Gaynor

Fix other related objects.

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