]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Only add non-empty descriptions.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 22 May 2022 14:10:55 +0000 (16:10 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 22 May 2022 14:10:55 +0000 (16:10 +0200)
bots/sledrun_wikitext_to_json.py

index 58ec4465a0a592a8127446d8e50542928bd9ff7b..196c0ce5bb2704750b37c74ae1fce874edac3499 100644 (file)
@@ -401,7 +401,9 @@ class SledrunWikiTextToJsonBot(
                 while line is not None and re.match(r"\* ", line) is None:
                     result.append(line)
                     line = next(line_iter, None)
-                sledrun_json['sled_rental_description'] = ''.join(result).strip()
+                description = ''.join(result).strip()
+                if len(description) > 0:
+                    sledrun_json['sled_rental_description'] = description
             _sled_rental_description()
 
             i = iter(v.nodes)