diff --git a/datatableview/utils.py b/datatableview/utils.py
index <HASH>..<HASH> 100644
--- a/datatableview/utils.py
+++ b/datatableview/utils.py
@@ -65,12 +65,10 @@ def get_model_at_related_field(model, attr):
     except FieldDoesNotExist:
         raise
 
-    if m2m:
-        model = field.field.rel.to
-    elif direct:
-        model = field.related.model
-    elif model:
-        model = model
+    if not direct and hasattr(field, 'model'): # Reverse relationship
+        model = field.model
+    elif hasattr(field, 'rel') and field.rel: # Forward/m2m relationship
+        model = field.rel.to
     else:
         raise ValueError("{}.{} ({}) is not a relationship field.".format(model.__name__, attr,
                 field.__class__.__name__))
Fixes underlying field access

Most commonly, the caller of resolve_orm_path would detect valid
FieldDoesNotExist errors for the user and silently move along, but
there were false positives, causing several relationships to treated as
invalid.