def __api_ordering_to_search_ordering(self, params):
        """Map filter field names to respective sortable field names using
        self.Meta.search_ordering_fields_map.

        """
        # if nothing to map or no mapping, exit
        if (params not in 'order_by' or
            not getattr(self.Meta, 'search_ordering_fields_map', None)):
            return params

        new_order_by = self.__convert_ordering(
            dict(params).get('order_by'), self.Meta.search_ordering_fields_map)
        if new_order_by != params['order_by']:
            try:
                params['order_by'] = new_order_by
            except AttributeError:
                params = dict(params, order_by=new_order_by)
        return params
dataset/ETHPy150Open ipeirotis/Mturk-Tracker/app/mturk/search/crud_extensions.py/SearchResource.__api_ordering_to_search_ordering/swapped operands of `not in`