From f8002c85da5539948e6413a844c2444b7057fe10 Mon Sep 17 00:00:00 2001 From: Jonathan Golder Date: Sat, 2 Sep 2017 14:23:25 +0200 Subject: [PATCH] Do not search for templates recursivly Since nested templates did not get an index in global wikicode object searching for index of an nested template results in ValueError Related Task: [FS#153](https://fs.golderweb.de/index.php?do=details&task_id=153) --- bots/markpages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bots/markpages.py b/bots/markpages.py index 63f6d23..00e33ba 100644 --- a/bots/markpages.py +++ b/bots/markpages.py @@ -235,7 +235,7 @@ class MarkPagesBot( CurrentPageBot ): # sets 'current_page' on each treat() # There is none on empty pages, so we need to check if leadsec: # Get the last template in leadsec - ltemplates = leadsec.filter_templates() + ltemplates = leadsec.filter_templates(recursive=False) # If there is one, add notice after this if ltemplates: