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

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)