ballot.models.vote.complex_vote

Module Contents

Classes

ComplexVote

A complex vote with proposal, counter-proposal and tie-breaker.

class ballot.models.vote.complex_vote.ComplexVote[source]

Bases: onegov.ballot.models.vote.vote.Vote

A complex vote with proposal, counter-proposal and tie-breaker.

property polymorphic_base: type[onegov.ballot.models.vote.vote.Vote][source]
property counter_proposal: onegov.ballot.models.vote.ballot.Ballot[source]
property tie_breaker: onegov.ballot.models.vote.ballot.Ballot[source]
property answer: str | None[source]
property yeas_percentage: float[source]

The percentage of yeas (discounts empty/invalid ballots).

If the proposal won or both proposal and counter-proposal were rejected, we show the yeas/nays of the proposal.

__mapper_args__[source]
static get_answer(counted: bool, proposal: Ballot | BallotResult | None, counter_proposal: Ballot | BallotResult | None, tie_breaker: Ballot | BallotResult | None) str | None[source]