]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Consider existing "operator" as has_operator.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sat, 11 Jun 2022 12:03:51 +0000 (14:03 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sat, 11 Jun 2022 12:03:51 +0000 (14:03 +0200)
wrpylib/wrmwmarkup.py

index 16ce286228021bc7d57113ffe072edfc180b9a7a..752cf65add09f584284be537a3f730836640a7d1 100644 (file)
@@ -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', ''))),
         ('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', ''))),
         ('Ö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', ''))),