From 5e1f023a13039353cd27e4679bc1948e6363179b Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Tue, 8 Nov 2011 00:30:08 -0500 Subject: [PATCH] Don't do notes for accepted or declined submissions. --- bot/tasks/afc_statistics.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bot/tasks/afc_statistics.py b/bot/tasks/afc_statistics.py index b8d291e..bba648e 100644 --- a/bot/tasks/afc_statistics.py +++ b/bot/tasks/afc_statistics.py @@ -594,6 +594,10 @@ class Task(BaseTask): """ notes = "" + ignored_charts = [CHART_ACCEPT, CHART_DECLINE] + if chart in ignored_charts: + return notes + if re.search("\{\{afc submission\|d\|(.*?)\}\}", content, re.I|re.S): notes += "|nr=1" # Submission was resubmitted @@ -606,10 +610,9 @@ class Task(BaseTask): else: notes += "|nu=1" # Submission is completely unsourced - pending_charts = [CHART_PEND, CHART_DRAFT, CHART_REVIEW] time_since_modify = (datetime.now() - m_time).seconds max_time = 4 * 24 * 60 * 60 - if chart in pending_charts and time_since_modify > max_time: + if time_since_modify > max_time: notes += "|no=1" # Submission hasn't been touched in over 4 days creator = self.site.get_user(c_user)