Commit bac6f1fc by Martin Hill

check if field.to_fields is None

parent e4754649
...@@ -92,7 +92,7 @@ def _get_fields(opts): ...@@ -92,7 +92,7 @@ def _get_fields(opts):
def _get_to_field(field): def _get_to_field(field):
return field.to_fields[0] if hasattr(field, 'to_fields') else None return field.to_fields[0] if hasattr(field, 'to_fields') and field.to_fields else None
def _get_forward_relationships(opts): def _get_forward_relationships(opts):
......
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