diff --git a/src/solo_turnier/tests/test_worker.py b/src/solo_turnier/tests/test_worker.py index d9cae8f..51a5c01 100644 --- a/src/solo_turnier/tests/test_worker.py +++ b/src/solo_turnier/tests/test_worker.py @@ -44,7 +44,8 @@ def test_extractCompetitionFromRow(): 'group': 'Kin', 'place': '2', 'placeTo': '2', - 'id': 2 + 'id': 2, + 'finalist': None } assert person.__dict__ == expected diff --git a/src/solo_turnier/worker.py b/src/solo_turnier/worker.py index 58abf4a..f6635e9 100644 --- a/src/solo_turnier/worker.py +++ b/src/solo_turnier/worker.py @@ -59,6 +59,7 @@ class CompetitionResult: self.place = place self.placeTo = placeTo self.id = int(id) + self.finalist = None @staticmethod def extractFromResultRow(row: ResultRow): @@ -75,7 +76,12 @@ class CompetitionResult: result = f'{self.place}.' else: result = f'{self.place}.-{self.placeTo}.' - return f'Result[{self.id}]({self.group} {self.class_} {self.dance} as {result})' + + if self.finalist == True: + finalist = '[F]' + else: + finalist = '' + return f'Result[{self.id}]({self.group} {self.class_} {self.dance} as {result}{finalist})' def __eq__(self, o): if not isinstance(o, CompetitionResult):