Refactored Node.get_absolute_url and related functions (such as MultiView.reverse...
[philo.git] / middleware.py
index ad660ec..832bd16 100644 (file)
@@ -20,6 +20,10 @@ class LazyNode(object):
                        except Node.DoesNotExist:
                                node = None
                        
                        except Node.DoesNotExist:
                                node = None
                        
+                       if subpath is None:
+                               subpath = ""
+                       subpath = "/" + subpath
+                       
                        if node:
                                node.subpath = subpath
                        
                        if node:
                                node.subpath = subpath