1.0.0 #253
| @@ -3,8 +3,6 @@ import functools | ||||
| from cpl_core.utils import String | ||||
| from cpl_query.extension import List | ||||
|  | ||||
| from bot_api.exception.service_error_code_enum import ServiceErrorCode | ||||
| from bot_api.exception.service_exception import ServiceException | ||||
| from bot_graphql.abc.filter_abc import FilterABC | ||||
|  | ||||
|  | ||||
| @@ -32,9 +30,7 @@ class Sort(FilterABC): | ||||
|     def _by_column(self, x): | ||||
|         atr = self._rgetattr(x, String.convert_to_snake_case(self._sort_column), None) | ||||
|         if atr is None: | ||||
|             raise ServiceException( | ||||
|                 ServiceErrorCode.InvalidData, f"Attribute {self._sort_column} in object of {type(x)} not found" | ||||
|             ) | ||||
|             return "" | ||||
|         return atr | ||||
|  | ||||
|     def filter(self, query: List, *args) -> List: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user