Miscellaneous bug fixes

This commit is contained in:
Collin R
2021-04-25 00:56:09 -07:00
parent ee7e2cb446
commit 3521ac2523
5 changed files with 127 additions and 31 deletions

View File

@@ -8,6 +8,18 @@
* [X] Allow multiple users to be awarded points on a single post
* So just check whether each user is already awarded a point for a given post
## Bugs
* [X] mod /helped command doesn't work on one post (some posts?)
* the problem here seems to be the fact that when the bot adds a point for a solution comment, it
also adds the comment to the comments table without first checking whether it already exists
* while it is the case that we should only have one one `solution` row for each comment, it is potentially
possible that a comment could already be in the db when we add a solution for it, e.g. if the solution was
deleted (meaning the point was removed) and then we want to add it back, or something??
* [X] bot crashes when a mod is trying to award a point to a solution on a deleted post
* the problem is that the new schema had the submission_id as a required foreign key, but a
deleted post will not have one
* according to them, since only mods will award points on deleted posts, it's fine if the fix is limited to mods
## File-Specific
### bot.py

View File

@@ -4,15 +4,11 @@ File-specific lists are in loose descending order of priority.
## Current
N / A
N/A
## Bugs
* [ ] Users can get multiple points for same solution
- Scenario:
- OP comments !solved
- OP deletes !solved comment
- OP comments !solved again
- Hopefully this will be easily solved once db migrations are working
* [ ] For some posts, the bot adds a point to the database, but crashes before being able to reply
## General