From e4bbd29cc82d8972afc67d655f6947838aedcc24 Mon Sep 17 00:00:00 2001 From: Jason McBrayer Date: Sun, 27 Jan 2019 22:27:46 -0500 Subject: [PATCH] Fix pagination on Pleroma (probably) --- brutaldon/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/brutaldon/views.py b/brutaldon/views.py index aa48194..d50cde3 100644 --- a/brutaldon/views.py +++ b/brutaldon/views.py @@ -127,10 +127,13 @@ def timeline(request, timeline='home', timeline_name='Home', max_id=None, since_ prev = data[0]._pagination_prev if len(mastodon.timeline(since_id=prev['since_id'])) == 0: prev = None + else: + prev['since_id'] = data[0].id except (IndexError, AttributeError): prev = None try: next = data[-1]._pagination_next + next['max_id'] = data[-1].id except (IndexError, AttributeError): next = None