Skip to content

Commit

Permalink
catch none
Browse files Browse the repository at this point in the history
  • Loading branch information
jkppr committed Nov 27, 2024
1 parent 1f33de1 commit 69432da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api_client/python/timesketch_api_client/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@ def to_dict(self):
"""Returns a dict with the respone of the query."""
if self._raw_response is None:
self._execute_query()
if not self._raw_response:
if self._raw_response is None:
raise ValueError("No results to return.")

return self._raw_response
Expand All @@ -1110,7 +1110,7 @@ def to_pandas(self):
"""Returns a pandas DataFrame with the response of the query."""
if self._raw_response is None:
self._raw_response = self._execute_query()
if not self._raw_response:
if self._raw_response is None:
raise ValueError("No results to return.")

return_list = []
Expand Down

0 comments on commit 69432da

Please sign in to comment.