kopia lustrzana https://github.com/halcy/Mastodon.py
Merge pull request #397 from jikamens/master
fetch_next and fetch_previous shouldn't crash on last pagepull/400/head
commit
85e0cf468b
|
@ -134,6 +134,9 @@ class Mastodon(Internals):
|
|||
else:
|
||||
params = copy.deepcopy(previous_page)
|
||||
|
||||
if params is None:
|
||||
return None
|
||||
|
||||
is_pagination_dict = False
|
||||
if isinstance(previous_page, dict):
|
||||
if all(key in ['_pagination_method', '_pagination_endpoint', 'min_id', 'max_id', 'since_id', 'limit'] for key in previous_page):
|
||||
|
@ -173,6 +176,9 @@ class Mastodon(Internals):
|
|||
else:
|
||||
params = copy.deepcopy(next_page)
|
||||
|
||||
if params is None:
|
||||
return None
|
||||
|
||||
is_pagination_dict = False
|
||||
if isinstance(next_page, dict):
|
||||
if all(key in ['_pagination_method', '_pagination_endpoint', 'min_id', 'max_id', 'since_id', 'limit'] for key in next_page):
|
||||
|
|
Ładowanie…
Reference in New Issue