Voter deletion fails
Deleting a voter from a polling group fails because the original line for accounts.getId()
obtains a copy of the object in accounts rather an reference to it
// Find the voter in the group
GroupAccounts accounts = getTable<GroupAccounts>(group->id);
auto account = accounts.getId(*voterId, "Unable to remove voter from polling group: voter name not recognized");
The subsequent attempt to erase that object from accounts ...
// Delete the voter from the group
accounts.erase(account);
... fails because the copy of the object is not in accounts
.