Fix "Ex" display in web UI

This commit is contained in:
RunasSudo 2021-07-23 00:10:53 +10:00
parent 85eda02d4d
commit 65b1d8e42b
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -340,7 +340,7 @@ fn update_results_table<N: Number>(stage_num: usize, state: &CountState<N>, opts
} }
CandidateState::Excluded => { CandidateState::Excluded => {
result.push(&format!(r#"<td class="{}count excluded">{}</td>"#, tdclasses2, pp(&count_card.transfers, opts.pp_decimals)).into()); result.push(&format!(r#"<td class="{}count excluded">{}</td>"#, tdclasses2, pp(&count_card.transfers, opts.pp_decimals)).into());
if count_card.parcels.is_empty() { if count_card.parcels.iter().all(|p| p.votes.is_empty()) {
result.push(&format!(r#"<td class="{}count excluded">Ex</td>"#, tdclasses2).into()); result.push(&format!(r#"<td class="{}count excluded">Ex</td>"#, tdclasses2).into());
} else { } else {
result.push(&format!(r#"<td class="{}count excluded">{}</td>"#, tdclasses2, pp(&count_card.votes, opts.pp_decimals)).into()); result.push(&format!(r#"<td class="{}count excluded">{}</td>"#, tdclasses2, pp(&count_card.votes, opts.pp_decimals)).into());