Contest deletion fails if it contains a write-in candidate
Deleting a contest involving a write-in can fail because there would effectively be multiple attempts to delete the same write-in candidate: in DeleteContestDecisions()
, DeleteContestResults()
, and DeleteContestWriteins()
.
// Delete results, decisions, contestants, and write-ins
DeleteContestResults(*this, groupId, contestId);
// ReleaseWritein()
// conditional writeIns.erase(contestant);
DeleteContestDecisions(*this, groupId, contestId);
// ReleaseWritein()
// conditional writeIns.erase(contestant);
DeleteContestContestants(*this, groupId, contestId);
DeleteContestWriteIns(*this, groupId, contestId);