Pārlūkot izejas kodu

Don't do notes for accepted or declined submissions.

tags/v0.1^2
Ben Kurtovic pirms 12 gadiem
vecāks
revīzija
5e1f023a13
1 mainītis faili ar 5 papildinājumiem un 2 dzēšanām
  1. +5
    -2
      bot/tasks/afc_statistics.py

+ 5
- 2
bot/tasks/afc_statistics.py Parādīt failu

@@ -594,6 +594,10 @@ class Task(BaseTask):
""" """
notes = "" 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): if re.search("\{\{afc submission\|d\|(.*?)\}\}", content, re.I|re.S):
notes += "|nr=1" # Submission was resubmitted notes += "|nr=1" # Submission was resubmitted


@@ -606,10 +610,9 @@ class Task(BaseTask):
else: else:
notes += "|nu=1" # Submission is completely unsourced notes += "|nu=1" # Submission is completely unsourced


pending_charts = [CHART_PEND, CHART_DRAFT, CHART_REVIEW]
time_since_modify = (datetime.now() - m_time).seconds time_since_modify = (datetime.now() - m_time).seconds
max_time = 4 * 24 * 60 * 60 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 notes += "|no=1" # Submission hasn't been touched in over 4 days


creator = self.site.get_user(c_user) creator = self.site.get_user(c_user)


Notiek ielāde…
Atcelt
Saglabāt