Skip to content

Commit

Permalink
Election Day: Update conversion of eCH domains.
Browse files Browse the repository at this point in the history
TYPE: Feature
LINK: OGC-1673
  • Loading branch information
Marc Sommerhalder committed Jun 25, 2024
1 parent b3a879e commit dc8b473
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/onegov/election_day/formats/imports/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,10 +538,15 @@ def convert_ech_domain(
if domain.domain_of_influence_type == DomainOfInfluenceTypeType.CT:
return True, 'canton', ''
if domain.domain_of_influence_type == DomainOfInfluenceTypeType.BZ:
# todo: should we map to 'region' or 'district', depending on
# whetever we find the name in the principals regions or
# districts (of the given year)?
return False, 'none', ''
# BZ might refer to different domains. This might be for example
# DomainOfInfluenceMixin.region, DomainOfInfluenceMixin.district
# or even a different domain we don't know (yet) - such as a court
# district. Even if we know the district in case of "region" and
# "district", we don't know the indentifiation, as this is not (yet)
# standardized at this time.
# We therefore set the domain to "none" and rely on all the results
# (one for each municipality) being present, even if not counted yet.
return True, 'none', ''
if domain.domain_of_influence_type == DomainOfInfluenceTypeType.MU:
if isinstance(principal, Municipality):
return True, 'municipality', ''
Expand Down

0 comments on commit dc8b473

Please sign in to comment.