diff --git a/qbosdk/apis/api_base.py b/qbosdk/apis/api_base.py index d4690a4..dbd105f 100644 --- a/qbosdk/apis/api_base.py +++ b/qbosdk/apis/api_base.py @@ -110,7 +110,7 @@ def _query_get_all_generator(self, object_type: str, url: str) -> Generator[Dict data = json.loads(response.text) query_response = data['QueryResponse'] - if not query_response[object_type]: + if not query_response or object_type not in query_response: break for obj in query_response[object_type]: diff --git a/setup.py b/setup.py index 4ed5f2f..ef4cdec 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setuptools.setup( name='qbosdk', - version='0.17.0', + version='0.17.1', author='Shwetabh Kumar', author_email='shwetabh.kumar@fyle.in', description='Python SDK for accessing Quickbooks Online APIs',