Skip to content

Commit

Permalink
Catch data is None
Browse files Browse the repository at this point in the history
  • Loading branch information
tijsverkoyen committed Jan 31, 2024
1 parent 7be04b0 commit b12e433
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def _do_call(self, url: str, json: dict):
f'Retrieving the data for {url} failed with failCode: {json_data[ATTR_FAIL_CODE]}, message: {json_data[ATTR_DATA]}'
)

if ATTR_DATA not in json_data:
if ATTR_DATA not in json_data or json_data[ATTR_DATA] is None:
raise FusionSolarOpenApiError(f'Retrieving the data failed. Raw response: {response.text}')

return json_data
Expand Down

0 comments on commit b12e433

Please sign in to comment.