aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mastodon')
-rw-r--r--mastodon/Mastodon.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 1e1d90e..4774761 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -829,7 +829,7 @@ class Mastodon:
829 829
830 Returns the next page or None if no further data is available. 830 Returns the next page or None if no further data is available.
831 """ 831 """
832 if isinstance(previous_page, list): 832 if isinstance(previous_page, list) and len(previous_page) != 0:
833 if '_pagination_next' in previous_page[-1]: 833 if '_pagination_next' in previous_page[-1]:
834 params = copy.deepcopy(previous_page[-1]['_pagination_next']) 834 params = copy.deepcopy(previous_page[-1]['_pagination_next'])
835 else: 835 else:
@@ -853,7 +853,7 @@ class Mastodon:
853 853
854 Returns the previous page or None if no further data is available. 854 Returns the previous page or None if no further data is available.
855 """ 855 """
856 if isinstance(next_page, list): 856 if isinstance(next_page, list) and len(previous_page) != 0:
857 if '_pagination_prev' in next_page[0]: 857 if '_pagination_prev' in next_page[0]:
858 params = copy.deepcopy(next_page[0]['_pagination_prev']) 858 params = copy.deepcopy(next_page[0]['_pagination_prev'])
859 else: 859 else:
Powered by cgit v1.2.3 (git 2.41.0)