mirror of
https://gitlab.com/brutaldon/brutaldon
synced 2025-06-05 21:49:32 +02:00
Fix a bug in bundling notes
This commit is contained in:
@@ -642,7 +642,10 @@ def note(request, next=None, prev=None):
|
|||||||
if account.preferences.bundle_notifications:
|
if account.preferences.bundle_notifications:
|
||||||
|
|
||||||
def bundle_key(note):
|
def bundle_key(note):
|
||||||
|
try:
|
||||||
return str(note.status.id) + note.type
|
return str(note.status.id) + note.type
|
||||||
|
except:
|
||||||
|
return str(note.id) + note.type
|
||||||
|
|
||||||
sorted_notes = sorted(notes, key=bundle_key, reverse=True)
|
sorted_notes = sorted(notes, key=bundle_key, reverse=True)
|
||||||
for _, group in groupby(sorted_notes, bundle_key):
|
for _, group in groupby(sorted_notes, bundle_key):
|
||||||
|
Reference in New Issue
Block a user