def get_ordering(self, request, queryset, view):
        params = view.get_request_feature(view.SORT)
        if params:
            fields = [param.strip() for param in params]
            valid_ordering, invalid_ordering = self.remove_invalid_fields(
                queryset, fields, view
            )

            # if any of the sort fields are invalid, throw an error.
            # else return the ordering
            if invalid_ordering:
                raise ValidationError(
                    "Invalid filter field: %s" % invalid_ordering
                )
            else:
                return valid_ordering

        # No sorting was included
        return self.get_default_ordering(view)
Returns a NEW selector that requires the current s-object be valid,
dataset/ETHPy150Open AltSchool/dynamic-rest/dynamic_rest/filters.py/DynamicSortingFilter.get_ordering--crossover with--dataset/ETHPy150Open spranesh/Redhawk/redhawk/common/selector.py/S.And