mirror of https://github.com/procxx/kepka.git
Correctly apply 'min' updates in polls.
This commit is contained in:
parent
2f9db1d069
commit
5aacf867cd
|
@ -168,13 +168,12 @@ bool PollData::applyResultToAnswers(
|
|||
answer->chosen = voters.is_chosen();
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
if (!isMinResults || closed()) {
|
||||
if (answer->correct != voters.is_correct()) {
|
||||
answer->correct = voters.is_correct();
|
||||
changed = true;
|
||||
}
|
||||
} else if (const auto existing = answerByOption(option)) {
|
||||
answer->chosen = existing->chosen;
|
||||
answer->correct = existing->correct;
|
||||
}
|
||||
return changed;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue