From 6617dcf0a83534c893c167dc9ae239fa6d67f2e1 Mon Sep 17 00:00:00 2001 From: Abdul Rehman Date: Wed, 3 Dec 2025 15:29:44 +0500 Subject: [PATCH] fix: use string thread IDs for read_states lookup in MySQL backend --- forum/backends/mysql/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forum/backends/mysql/api.py b/forum/backends/mysql/api.py index 93591ac8..66aada4f 100644 --- a/forum/backends/mysql/api.py +++ b/forum/backends/mysql/api.py @@ -861,7 +861,7 @@ def threads_presentor( for thread_id in thread_ids: thread = threads.get(id=thread_id) is_read, unread_count = read_states.get( - thread.pk, (False, thread.comment_count) + str(thread.pk), (False, thread.comment_count) ) is_endorsed = threads_endorsed.get(thread.pk, False) abuse_flagged_count = threads_flagged.get(str(thread.pk), 0)