Skip to content

bugfix: use string thread IDs for read_states lookup in MySQL backend#266

Merged
taimoor-ahmed-1 merged 1 commit intoopenedx:masterfrom
edly-io:fix-mysql-read-thread
Dec 5, 2025
Merged

bugfix: use string thread IDs for read_states lookup in MySQL backend#266
taimoor-ahmed-1 merged 1 commit intoopenedx:masterfrom
edly-io:fix-mysql-read-thread

Conversation

@rehmansheikh222
Copy link
Contributor

This PR fixes the MySQL discussions backend where all threads were reported as read = false because the read state lookup was using integer thread IDs while the read_states dict is keyed by string thread IDs. The lookup now uses str(thread.pk), so read and unread_comment_count are populated correctly for each thread.

Fixes #263.

@taimoor-ahmed-1 taimoor-ahmed-1 merged commit 0026755 into openedx:master Dec 5, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Read Thread not working correctly with MySql Backend

2 participants