opensafely-core / airlock

Other
1 stars 0 forks source link

Prevent resetting of file votes after a review has been submitted #584

Closed rebkwok closed 1 month ago

rebkwok commented 1 month ago

After a user submits a review, the request changes status (to PARTIALLY_REVIEWED or REVIEWED). In these statuses, users can still change their votes. However, we want to prevent them from re-setting votes to undecided, to avoid the possibility of returning a request with incomplete file reviews.

Also includes some refactoring of the voting button logic in the view to make the template logic simpler.

rebkwok commented 1 month ago

I like the refactor of the voting button logic!

Good! I'm planning to have a look for some more candidates for this sort of thing next week along with refactoring the permissions out :)