Skip to content

Commit

Permalink
Safely access recordList.record in searchMoreWithId() in the same man…
Browse files Browse the repository at this point in the history
…ner as search() (#1) (#137)
  • Loading branch information
avatarneil authored Sep 2, 2024
1 parent 2a2cddc commit 36c6eda
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions netsuitesdk/internal/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,13 @@ def searchMoreWithId(self, searchId, pageIndex):
status = result.status
success = status.isSuccess
if success:
result.records = result.recordList.record
return result
if hasattr(result.recordList, 'record'):
result.records = result.recordList.record
return result
else:
# Did not find anything
result.records = None
return result
else:
exc = self._request_error('searchMoreWithId', detail=status['statusDetail'][0])
raise exc
Expand Down

0 comments on commit 36c6eda

Please sign in to comment.