Mitglieder auf einem Server anzeigen #130 #206

Merged
edraft merged 18 commits from #130 into 1.0.0 2023-02-18 14:56:39 +01:00
Showing only changes of commit 6149825101 - Show all commits

View File

@ -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: