mirror of
http://git.carcosa.net/jmcbray/brutaldon.git
synced 2024-11-23 07:13:52 -05:00
Merge pull request #73 from cyisfor/last_seen_index_error
random exception when viewing notifications
This commit is contained in:
commit
9a99f34945
@ -605,9 +605,12 @@ def note(request, next=None, prev=None):
|
|||||||
account, mastodon = get_usercontext(request)
|
account, mastodon = get_usercontext(request)
|
||||||
except NotLoggedInException:
|
except NotLoggedInException:
|
||||||
return redirect(about)
|
return redirect(about)
|
||||||
last_seen = mastodon.notifications(limit=1)[0]
|
try:
|
||||||
account.note_seen = last_seen.id
|
last_seen = mastodon.notifications(limit=1)[0]
|
||||||
account.save()
|
except IndexError: pass
|
||||||
|
else:
|
||||||
|
account.note_seen = last_seen.id
|
||||||
|
account.save()
|
||||||
|
|
||||||
notes = mastodon.notifications(limit=40, max_id=next, min_id=prev)
|
notes = mastodon.notifications(limit=40, max_id=next, min_id=prev)
|
||||||
filters = get_filters(mastodon, context="notifications")
|
filters = get_filters(mastodon, context="notifications")
|
||||||
|
Loading…
Reference in New Issue
Block a user