From: Philipp Spitzer Date: Sat, 11 Jun 2022 12:03:51 +0000 (+0200) Subject: Consider existing "operator" as has_operator. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wrpylib.git/commitdiff_plain/2466da83f617811a60248bcf1389ad5583e0f8ff Consider existing "operator" as has_operator. --- diff --git a/wrpylib/wrmwmarkup.py b/wrpylib/wrmwmarkup.py index 16ce286..752cf65 100644 --- a/wrpylib/wrmwmarkup.py +++ b/wrpylib/wrmwmarkup.py @@ -480,7 +480,7 @@ def create_sledrun_wiki(sledrun_json: Dict, map_json: Optional[Dict], impression ('Länge', sledrun_json.get('length')), ('Schwierigkeit', opt_difficulty_german_from_str(sledrun_json.get('difficulty', ''))), ('Lawinen', opt_avalanches_german_from_str(sledrun_json.get('avalanches', ''))), - ('Betreiber', (sledrun_json.get('has_operator'), sledrun_json.get('operator'))), + ('Betreiber', (sledrun_json.get('has_operator', True if 'operator' in sledrun_json else None), sledrun_json.get('operator'))), ('Öffentliche Anreise', opt_public_transport_german_from_str(sledrun_json.get('public_transport', ''))), ('Aufstieg möglich', sledrun_json.get('walkup_possible')), ('Aufstieg getrennt', opt_tristate_german_comment_from_str(sledrun_json.get('walkup_separate', ''))),