From bc04c93bd3a9cf8bda7a333f62759f9a51996837 Mon Sep 17 00:00:00 2001 From: xxyzz Date: Mon, 9 Dec 2024 17:20:32 +0800 Subject: [PATCH] Save default templates old code doesn't save template "!" if analyze template is not enabled --- src/wikitextprocessor/dumpparser.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wikitextprocessor/dumpparser.py b/src/wikitextprocessor/dumpparser.py index e1a1b3df..a6d3c31f 100644 --- a/src/wikitextprocessor/dumpparser.py +++ b/src/wikitextprocessor/dumpparser.py @@ -141,6 +141,7 @@ def add_default_templates(wtp: "Wtp") -> None: title = f"{ns_local_name}:{title}" if not wtp.page_exists(title, ns_id): wtp.add_page(title, ns_id, body) + wtp.db_conn.commit() def analyze_and_overwrite_pages(