diff --git a/src/snek/view/threads.py b/src/snek/view/threads.py index 14431f1..4f3fe8c 100644 --- a/src/snek/view/threads.py +++ b/src/snek/view/threads.py @@ -28,6 +28,6 @@ class ThreadsView(BaseView): thread['last_message_user_color'] = user_last_message['color'] threads.append(thread) - threads.sort(key=lambda x: x['last_message_on'], reverse=True) + threads.sort(key=lambda x: x['last_message_on'] or '', reverse=True) return await self.render_template("threads.html", dict(threads=threads,user=user))