]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Don't omit walkup_note in Rodelbahnbox.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Thu, 21 Jul 2022 20:56:17 +0000 (22:56 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Thu, 21 Jul 2022 20:56:17 +0000 (22:56 +0200)
wrpylib/wrmwmarkup.py

index 3448bcf9ada016df9d31b35f50b751cf3963b71b..7186e9383b1b00efb67d3084c6098f4675e1c606 100644 (file)
@@ -17,7 +17,7 @@ from wrpylib.wrvalidators import LonLat, opt_lonlat_from_str, opt_lonlat_to_str,
     opt_phone_comment_enum_to_str, lift_german_from_str, GASTHAUSBOX_DICT, opt_difficulty_german_from_str, \
     opt_avalanches_german_from_str, opt_public_transport_german_from_str, \
     opt_tristate_german_comment_from_str, rodelbahnbox_to_str, lonlat_to_str, opt_no_or_str_to_str, \
-    opt_no_or_str_from_str, opt_tristate_german_from_str
+    opt_no_or_str_from_str, opt_tristate_german_from_str, tristate_german_from_str
 
 
 def split_lon_lat(value: Optional[LonLat]) -> Union[LonLat, Tuple[None, None]]:
@@ -502,7 +502,9 @@ def create_sledrun_wiki(sledrun_json: Dict, map_json: Optional[Dict], impression
         ('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', ''))),
+        ('Aufstieg getrennt', (
+            tristate_german_from_str(sledrun_json['walkup_separate']) if 'walkup_separate' in sledrun_json else None,
+            sledrun_json.get('walkup_note'))),
         ('Gehzeit', sledrun_json.get('walkup_time')),
         ('Aufstiegshilfe', aufstiegshilfe()),
         ('Beleuchtungsanlage', (opt_tristate_german_from_str(sledrun_json.get('nightlight_possible', '')),