(self)
return searches
List all saved searches for this sketch.

        Returns:
            List of search object (instance of search.Search).
List all saved searches for this sketch.
List all saved searches for this sketch .
def list_saved_searches(self):
        """List all saved searches for this sketch.

        Returns:
            List of search object (instance of search.Search).
        """
        if self.is_archived():
            raise RuntimeError(
                'Unable to list saved searches on an archived sketch.')

        data = self.lazyload_data()
        searches = []
        meta = data.get('meta', {})
        for saved_search in meta.get('views', []):
            search_obj = search.Search(sketch=self)
            try:
                search_obj.from_saved(saved_search.get('id'))
                searches.append(search_obj)
            except ValueError:
                logger.error(
                    'Unable to load a saved search with ID: {0:d}'.format(
                        saved_search.get('id', 0)), exc_info=True)

        return searches
def list_saved_searches ( self ) : if self . is_archived ( ) : raise RuntimeError ( 'Unable to list saved searches on an archived sketch.' ) data = self . lazyload_data ( ) searches = [ ] meta = data . get ( 'meta' , { } ) for saved_search in meta . get ( 'views' , [ ] ) : search_obj = search . Search ( sketch = self ) try : search_obj . from_saved ( saved_search . get ( 'id' ) ) searches . append ( search_obj ) except ValueError : logger . error ( 'Unable to load a saved search with ID: {0:d}' . format ( saved_search . get ( 'id' , 0 ) ) , exc_info = True ) return searches