Skip to content

Commit 8e32a25

Browse files
committed
Modified loop terminate condition to avoid KeyError
1 parent 07adae5 commit 8e32a25

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

qbosdk/apis/api_base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def _query_get_all_generator(self, object_type: str, url: str) -> Generator[Dict
110110
data = json.loads(response.text)
111111
query_response = data['QueryResponse']
112112

113-
if not query_response[object_type]:
113+
if not query_response or object_type not in query_response:
114114
break
115115

116116
for obj in query_response[object_type]:

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
setuptools.setup(
1010
name='qbosdk',
11-
version='0.17.0',
11+
version='0.17.1',
1212
author='Shwetabh Kumar',
1313
author_email='[email protected]',
1414
description='Python SDK for accessing Quickbooks Online APIs',

0 commit comments

Comments
 (0)