Closed coltonehrman closed 3 weeks ago
Appears the bug is only for Class 2 and is also happening with the Watched select box. No updates are persisting for Class 2 for me.
This is a tricky and rare bug that I haven't been able to pin down. It happens very occasionally for certain users on certain classes. The last time someone reported it, it was because somehow two database entries were recorded for the same user and class. I have attempted to make sure that when an entry already exists, the entry is updated and new one is not created, but I think the problem has something to do with two requests being sent (probably some kind of network issue) and the second one is initiated before the first one is complete, so any logic to check for an existing record doesn't work.
If you want to send me your email on Discord, I can check the DB manually to get rid of the duplicate record. It's a difficult issue to reproduce so it's hard to track down, but if you want to poke through the code and see if anything looks like a likely culprit, I'm happy to just try and see if it works.
When I try to un-select the checked in box, it does not persist.
https://github.com/labrocadabro/communitytaught/assets/12456288/df9a7970-4326-4a8a-9478-2db24908e81c