(self, sobject, search_type)
return search
get the search for this sobject and search_type
get the search for this sobject and search_type
get the search for this sobject and search_type
def _get_sobject_search(self, sobject, search_type):
        ''' get the search for this sobject and search_type '''
        if search_type.startswith("sthpw/connection"):
            search = Search(search_type)
            search.add_sobject_filter(sobject,"src_")
            if sobject.get_base_search_type() == 'prod/shot':
                search.add_filter('context', 'reference')
        elif search_type.startswith("sthpw/"):
            search = Search(search_type)
            search.add_sobject_filter(sobject)
        elif search_type.startswith("prod/render"):
            search = Search(search_type)
            search.add_sobject_filter(sobject)
        elif search_type.startswith("internal/support_email"):
            search = Search(search_type)
            search.add_filter("ticket_code", sobject.get_id() )
        else:
            search = Search(search_type)
            search.add_filter( sobject.get_foreign_key(), sobject.get_code() )
        return search
def _get_sobject_search ( self , sobject , search_type ) : if search_type . startswith ( "sthpw/connection" ) : search = Search ( search_type ) search . add_sobject_filter ( sobject , "src_" ) if sobject . get_base_search_type ( ) == 'prod/shot' : search . add_filter ( 'context' , 'reference' ) elif search_type . startswith ( "sthpw/" ) : search = Search ( search_type ) search . add_sobject_filter ( sobject ) elif search_type . startswith ( "prod/render" ) : search = Search ( search_type ) search . add_sobject_filter ( sobject ) elif search_type . startswith ( "internal/support_email" ) : search = Search ( search_type ) search . add_filter ( "ticket_code" , sobject . get_id ( ) ) else : search = Search ( search_type ) search . add_filter ( sobject . get_foreign_key ( ) , sobject . get_code ( ) ) return search