♻️ Replace LAUFEN in favour of AUSSTEHEND

This commit is contained in:
Brian Wiborg 2023-04-03 17:46:28 +02:00
parent 6298b84630
commit ae25cfc929
No known key found for this signature in database
GPG Key ID: BE53FA9286B719D6
3 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ class TestResult(unittest.TestCase):
def test_result_data(self): def test_result_data(self):
res = self.result.result() res = self.result.result()
assert res['state'] == "LAUFEND" assert res['state'] == "AUSSTEHEND"
assert res['voting']['title'] == 'Test' assert res['voting']['title'] == 'Test'
assert res['voting']['quorum']['kind'] == 'NONE' assert res['voting']['quorum']['kind'] == 'NONE'
assert res['voting']['quorum']['value'] == 0 assert res['voting']['quorum']['value'] == 0

View File

@ -61,7 +61,7 @@ def ls(verbose: bool = typer.Option(False, "--verbose", "-v", help="Verbose outp
with Storage() as store: with Storage() as store:
for v in store.votings: for v in store.votings:
if only_active: if only_active:
if Result(v).outcome != 'LAUFEND': if Result(v).outcome != 'AUSSTEHEND':
continue continue
if verbose: if verbose:
res = Result(v).result() res = Result(v).result()

View File

@ -114,7 +114,7 @@ class Result:
@abc.abstractmethod @abc.abstractmethod
def outcome(self) -> str: def outcome(self) -> str:
if not self.has_ended(): if not self.has_ended():
return "LAUFEND" return "AUSSTEHEND"
else: else:
return "ANGENOMMEN" if self.votes()[Vote.JA.name] > self.votes()[Vote.NEIN.name] and self.quorum_reached() else "ABGELEHNT" return "ANGENOMMEN" if self.votes()[Vote.JA.name] > self.votes()[Vote.NEIN.name] and self.quorum_reached() else "ABGELEHNT"