Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

Commit

Permalink
How did this happen
Browse files Browse the repository at this point in the history
  • Loading branch information
supertassu committed Jan 25, 2020
1 parent 9158922 commit 5552d30
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions majavahbot/tasks/task_1_effp.py
Expand Up @@ -24,7 +24,7 @@ def __init__(self, number, name):

def locate_page_name(self, section):
"""Used to locate page name from a section"""
results = search(section, self.get_task_configuration('page_title_regex'))
results = search(self.get_task_configuration('page_title_regex'), section)

if results is None:
return None
Expand Down Expand Up @@ -59,8 +59,9 @@ def process_new_report(self, section: str, user_name: str, api: MediawikiApi):
last_hit = None

if last_hit is None:
new_section += ":{{EFFP|nofilterstriggered|bot=1}} ~~~~\n"
edit_summary.append("Notify that no filters were triggered (task 1a)")
if page_title is None:
new_section += ":{{EFFP|nofilterstriggered|bot=1}} ~~~~\n"
edit_summary.append("Notify that no filters were triggered (task 1a)")
else:
last_hit_filter_id = last_hit['filter_id']
last_hit_page_title = last_hit['title']
Expand Down

0 comments on commit 5552d30

Please sign in to comment.