diff --git a/sp_api/util/load_all_pages.py b/sp_api/util/load_all_pages.py index 2c2d77dd..d9b5c35a 100644 --- a/sp_api/util/load_all_pages.py +++ b/sp_api/util/load_all_pages.py @@ -41,10 +41,10 @@ def wrapper(*args, **kwargs): ) if sleep_time > 0: time.sleep(sleep_time) - if next_token_only: - kwargs = {next_token_param: res.next_token} + if next_token_only: + kwargs = {next_token_param: res.next_token} else: - kwargs.update({next_token_param: res.next_token, **extras}) + kwargs.update({next_token_param: res.next_token, **extras}) else: done = True