Skip to content

Commit

Permalink
fix(core): issue causing search continuation to not work
Browse files Browse the repository at this point in the history
Signed-off-by: Jordan Shatford <[email protected]>
  • Loading branch information
jordanshatford committed Oct 23, 2023
1 parent 22d59ab commit e34359c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/ydcore/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ def _get(source: dict[Any, Any], path: list[Any]) -> Any:
if key in value:
value = value[key]
else:
return None
raise KeyError(key)
# If the key is for a list
elif type(key) is int:
if len(value) != 0:
value = value[key]
else:
return None
raise KeyError(key)
return value


Expand All @@ -46,8 +46,8 @@ def results(self) -> list[Video]:
def next(self) -> bool:
# If continuation exists, fetch new results to replace existing ones.
if self._continuation:
videos, continuation = self._fetch_and_parse()
self._results = videos
results, continuation = self._fetch_and_parse()
self._results = results
self._continuation = continuation
return True
else:
Expand Down

1 comment on commit e34359c

@vercel
Copy link

@vercel vercel bot commented on e34359c Oct 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.