瀏覽代碼

Misplaced submissions can't be 'resumbmitted'; page_special_user is only significant for CHART_PEND and CHART_DRAFT.

tags/v0.1^2
Ben Kurtovic 13 年之前
父節點
當前提交
609b1cce75
共有 1 個檔案被更改,包括 9 行新增8 行删除
  1. +9
    -8
      bot/tasks/afc_statistics.py

+ 9
- 8
bot/tasks/afc_statistics.py 查看文件

@@ -653,12 +653,12 @@ class Task(BaseTask):
"""
notes = ""

ignored_charts = [CHART_ACCEPT, CHART_DECLINE]
ignored_charts = [CHART_NONE, CHART_ACCEPT, CHART_DECLINE]
if chart in ignored_charts:
return notes

statuses = self.get_statuses(content)
if "D" in statuses:
if "D" in statuses and chart != CHART_MISPLACE:
notes += "|nr=1" # Submission was resubmitted

if len(content) < 500:
@@ -675,11 +675,12 @@ class Task(BaseTask):
if time_since_modify > max_time:
notes += "|no=1" # Submission hasn't been touched in over 4 days

creator = self.site.get_user(s_user)
try:
if creator.blockinfo():
notes += "|nb=1" # Submitter is blocked
except wiki.UserNotFoundError: # Likely an IP
pass
if chart in [CHART_PEND, CHART_DRAFT]:
submitter = self.site.get_user(s_user)
try:
if submitter.blockinfo():
notes += "|nb=1" # Submitter is blocked
except wiki.UserNotFoundError: # Likely an IP
pass

return notes

Loading…
取消
儲存