Fixes error when not finding any tweets

This commit is contained in:
procrastimax 2023-07-12 17:25:41 +02:00
parent 87bcd95e84
commit a7453d11d5
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ def search_query(query: str, limit: int = 5, sorting_method: str = "score") -> (
result = tweets.iloc[correct_indices]
if not len(result):
return None
return None, 0
if limit == -1:
limit = len(result)