Fix interaction between --exclusion parcels_by_order and --min-threshold when excluding candidates with 0 votes

This commit is contained in:
RunasSudo 2021-08-06 01:33:31 +10:00
parent 0af8d8a4d6
commit f706d7423b
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
1 changed files with 2 additions and 2 deletions

View File

@ -510,9 +510,9 @@ where
}
ExclusionMethod::ParcelsByOrder => {
// Exclude by parcel by order
if excluded_candidates.len() > 1 {
if excluded_candidates.len() > 1 && excluded_candidates.iter().any(|c| !state.candidates[c].parcels.is_empty()) {
// TODO: We can probably support this actually
panic!("--exclusion parcels_by_order is incompatible with --bulk-exclude");
panic!("--exclusion parcels_by_order is incompatible with multiple exclusions");
}
let count_card = state.candidates.get_mut(excluded_candidates[0]).unwrap();