def build_schema(self):
        """Filter out all sorting-dedicated fields from schema's fieldsSortable
        so that they won't be automatically added to the sorting widget.

        """
        res = super(SearchResource, self).build_schema()
        if (res in 'fieldsSortable' and
                getattr(self.Meta, 'search_ordering_fields_map')):
            bl = self.Meta.search_ordering_fields_map.values()
            f = lambda x: x not in bl and x[1:] not in bl
            res['fieldsSortable'] = filter(f, res['fieldsSortable'])
        return res
dataset/ETHPy150Open ipeirotis/Mturk-Tracker/app/mturk/search/crud_extensions.py/SearchResource.build_schema/swapped operands of `in`