ckan/lib/cli.py
def _update_search_params(self, search_data_dict):
        '''
        Update the `package_search` data dict with the user provided parameters

        Supported fields are `q`, `fq` and `fq_list`.

        If the provided JSON object can not be parsed the process stops with
        an error.

        Returns the updated data dict
        '''

        log = logging.getLogger(__name__)

        if not self.options.search_params:
            return search_data_dict

        try:
            user_search_params = json.loads(self.options.search_params)
        except ValueError as e:
            error('Unable to parse JSON search parameters: {0}'.format(e))

        if user_search_params.get('q'):
            search_data_dict['q'] = user_search_params['q']

        if user_search_params.get('fq'):
            if search_data_dict['fq']:
                search_data_dict['fq'] += ' ' + user_search_params['fq']
            else:
                search_data_dict['fq'] = user_search_params['fq']

        if (user_search_params.get('fq_list') and
                isinstance(user_search_params['fq_list'], list)):
            search_data_dict['fq_list'].extend(user_search_params['fq_list'])

        Update the `package_search` data dict with the user provided parameters

        Supported fields are `q`, `fq` and `fq_list`.

        If the provided JSON object can not be parsed the process stops with
        an error.

        Returns the updated data dict
        


If the provided JSON object can not be parsed the process stops with
an error.

Returns the updated data dict
If the provided JSON object can not be parsed the process stops with an error . Returns the updated data dict
def _update_search_params(self, search_data_dict):
        log = logging.getLogger(__name__)
        if not self.options.search_params:
            return search_data_dict
        try:
            user_search_params = json.loads(self.options.search_params)
        except ValueError as e:
            error('Unable to parse JSON search parameters: {0}'.format(e))
        if user_search_params.get('q'):
            search_data_dict['q'] = user_search_params['q']
        if user_search_params.get('fq'):
            if search_data_dict['fq']:
                search_data_dict['fq'] += ' ' + user_search_params['fq']
            else:
                search_data_dict['fq'] = user_search_params['fq']
        if (user_search_params.get('fq_list') and
                isinstance(user_search_params['fq_list'], list)):
            search_data_dict['fq_list'].extend(user_search_params['fq_list'])
def _update_search_params ( self , search_data_dict ) : log = logging . getLogger ( __name__ ) if not self . options . search_params : return search_data_dict try : user_search_params = json . loads ( self . options . search_params ) except ValueError as e : error ( 'Unable to parse JSON search parameters: {0}' . format ( e ) ) if user_search_params . get ( 'q' ) : search_data_dict [ 'q' ] = user_search_params [ 'q' ] if user_search_params . get ( 'fq' ) : if search_data_dict [ 'fq' ] : search_data_dict [ 'fq' ] += ' ' + user_search_params [ 'fq' ] else : search_data_dict [ 'fq' ] = user_search_params [ 'fq' ] if ( user_search_params . get ( 'fq_list' ) and isinstance ( user_search_params [ 'fq_list' ] , list ) ) : search_data_dict [ 'fq_list' ] . extend ( user_search_params [ 'fq_list' ] )
Update the `package_search` data dict with the user provided parameters
Supported fields are `q`, `fq` and `fq_list`.
Update the ` package_search ` data dict with the user provided parameters Supported fields are ` q ` ` fq ` and ` fq_list ` .
'''
        Update the `package_search` data dict with the user provided parameters

        Supported fields are `q`, `fq` and `fq_list`.

        If the provided JSON object can not be parsed the process stops with
        an error.

        Returns the updated data dict
        '''
self
search_data_dict