Use the helper function in the new capability

Revolutionary and magical.
This commit is contained in:
Laurent Bachelier 2012-03-13 22:10:24 +01:00
commit 6ad93c7ea9

View file

@ -39,8 +39,7 @@ class Book(CapBaseObject):
class ICapBook(ICapCollection):
def iter_resources(self, objs, split_path):
if Book in objs:
if len(split_path) > 0:
raise CollectionNotFound(split_path)
self._restrict_level(split_path)
return self.iter_books()