diff --git a/opensearchpy/client/tasks.py b/opensearchpy/client/tasks.py index 7e675233..0faebc2e 100644 --- a/opensearchpy/client/tasks.py +++ b/opensearchpy/client/tasks.py @@ -129,7 +129,7 @@ def get( :arg wait_for_completion: Should this request wait until the operation has completed before returning. Default is false. """ - if task_id in SKIP_IN_PATH: + if task_id not in SKIP_IN_PATH: warnings.warn( "Calling client.tasks.get() without a task_id is deprecated " "and will be removed in v8.0. Use client.tasks.list() instead.",