Split shipherd NodeNavigationInline into inlines for hosted/targeting inlines. Added...
[philo.git] / contrib / shipherd / models.py
index 2577245..0643c3e 100644 (file)
@@ -71,11 +71,11 @@ class NavigationManager(TreeManager):
                return hosted_navigation
        
        def _add_to_cache(self, using, node, qs=None):
-               if node.pk is None:
-                       return
-               
                if qs is None:
-                       roots = node.hosted_navigation.select_related('target_node')
+                       try:
+                               roots = node.hosted_navigation.select_related('target_node')
+                       except AttributeError:
+                               roots = []
                        qs = self.none()
                        
                        for root in roots: