doesn't necessarily have parent stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 06 Oct 2009 18:17:11 +0200
branchstable
changeset 3578 7f026d15cc82
parent 3577 067610a0e12f
child 3579 ebeb1ae451b7
child 3583 385d013c7adb
doesn't necessarily have parent
entities/__init__.py
--- a/entities/__init__.py	Tue Oct 06 18:15:05 2009 +0200
+++ b/entities/__init__.py	Tue Oct 06 18:17:11 2009 +0200
@@ -183,7 +183,7 @@
         """return (path, parameters) which should be used as redirect
         information when this entity is being deleted
         """
-        if self.parent():
+        if hasattr(self, 'parent') and self.parent():
             return self.parent().rest_path(), {}
         return str(self.e_schema).lower(), {}