not saving pb if test was bailed out

This commit is contained in:
Jack 2021-09-24 22:22:39 +01:00
parent 843bee022b
commit 590ade59c6

View file

@ -220,8 +220,13 @@ class ResultController {
//
}
const isPb = await UserDAO.checkIfPb(uid, result);
const tagPbs = await UserDAO.checkIfTagPb(uid, result);
let isPb = false;
let tagPbs = [];
if (!result.bailedOut) {
isPb = await UserDAO.checkIfPb(uid, result);
tagPbs = await UserDAO.checkIfTagPb(uid, result);
}
if (isPb) {
result.isPb = true;