(self)
return template
Save the search as a search template.

        Returns:
            A search template object (searchtemplate.SearchTemplate).
Save the search as a search template.
Save the search as a search template .
def save_as_template(self):
        """Save the search as a search template.

        Returns:
            A search template object (searchtemplate.SearchTemplate).
        """
        if not self._resource_id:
            logger.warning('Search has not been saved first, saving now.')
            return_string = self.save()
            logger.info(return_string)

        template = searchtemplate.SearchTemplate(self.api)
        template.from_search_object(self)

        print(template.save())
        self._searchtemplate = template.id
        return template
def save_as_template ( self ) : if not self . _resource_id : logger . warning ( 'Search has not been saved first, saving now.' ) return_string = self . save ( ) logger . info ( return_string ) template = searchtemplate . SearchTemplate ( self . api ) template . from_search_object ( self ) print ( template . save ( ) ) self . _searchtemplate = template . id return template