From 50a46517bd38447846ad37875e6c5af56929871f Mon Sep 17 00:00:00 2001 From: Colin Ferm Date: Fri, 18 Sep 2015 13:03:26 -0400 Subject: [PATCH] Fixed an issue where sometimes there are models with a model_class() of None --- django_spaghetti/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/django_spaghetti/views.py b/django_spaghetti/views.py index c7636c0..afbeab6 100644 --- a/django_spaghetti/views.py +++ b/django_spaghetti/views.py @@ -16,6 +16,9 @@ def plate(request): nodes = [] edges = [] for model in models: + if (model.model_class() == None): + continue + model.doc = model.model_class().__doc__ _id = "%s__%s"%(model.app_label,model.model) if _id in excludes: