Fixes error when not finding any tweets
This commit is contained in:
parent
87bcd95e84
commit
a7453d11d5
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ def search_query(query: str, limit: int = 5, sorting_method: str = "score") -> (
|
||||||
result = tweets.iloc[correct_indices]
|
result = tweets.iloc[correct_indices]
|
||||||
|
|
||||||
if not len(result):
|
if not len(result):
|
||||||
return None
|
return None, 0
|
||||||
|
|
||||||
if limit == -1:
|
if limit == -1:
|
||||||
limit = len(result)
|
limit = len(result)
|
||||||
|
|
Loading…
Reference in a new issue