diff --git a/fast_bitrix24/user_request.py b/fast_bitrix24/user_request.py index 67de81a..0a061d5 100644 --- a/fast_bitrix24/user_request.py +++ b/fast_bitrix24/user_request.py @@ -130,8 +130,8 @@ class GetAllUserRequest(UserRequestAbstract): "get_all() doesn't support parameters 'start' or 'order'", ) @icontract.require( - lambda self: not self.st_method.startswith("tasks.elapseditem."), - "get_all() shouldn't be used with 'tasks.elapseditem.*' method group. " + lambda self: not self.st_method.startswith("tasks."), + "get_all() shouldn't be used with 'tasks.*' method group. " "Use call(raw=True) instead. Read more: " "https://github.com/leshchenko1979/fast_bitrix24/issues/199", ) @@ -270,6 +270,12 @@ def __init__( "get_by_ID(): 'ID_list' should be a Sequence " "if a progress bar is to be displayed", ) + @icontract.require( + lambda self: not self.st_method.startswith("tasks."), + "get_by_ID() shouldn't be used with 'tasks.*' method group. " + "Use call(raw=True) instead. Read more: " + "https://github.com/leshchenko1979/fast_bitrix24/issues/199", + ) def check_special_limitations(self): return True @@ -307,6 +313,12 @@ def __init__(self, bitrix, method: str, item_list: Union[Dict, Iterable[Dict]]): "call(): 'ID_list' should be a Sequence " "if a progress bar is to be displayed", ) + @icontract.require( + lambda self: not self.st_method.startswith("tasks."), + "call(raw=False) shouldn't be used with 'tasks.*' method group. " + "Use call(raw=True) instead. Read more: " + "https://github.com/leshchenko1979/fast_bitrix24/issues/199", + ) def check_special_limitations(self): if self.st_method.endswith(GET_ALL_ENDINGS): warnings.warn(