pyweekorg / pyweekorg

Django web application for pyweek.org
https://pyweek.org/
5 stars 6 forks source link

Discussion board, message index doesn't match post #102

Open gummbum opened 1 year ago

gummbum commented 1 year ago

I see a weird thing on the Pyweek discussion board. Here's an example. This message:

Reanimation Room to fix your games — 1 reply — updated by Buffalo974, 2 Sep 2022

The message index reads "1 reply", dated 2022. Upon opening the message I cannot see a reply. There's only the original message dated 2019.

In my estimation, either the reply is missing or the index displays errors. Message Index redacted Message thread redacted

lordmauve commented 6 months ago

I think this happens when spam comments are deleted. The comment counts are maintained in a separate database column because aggregations didn't exist in Django ORM when the site was written.

The fix would be to switch to ORM aggregations and drop that column.