FIX: Correct ordering for post_edits report, and remove query limit

This commit is contained in:
David Taylor 2019-08-13 16:53:16 +01:00
parent 572e928cba
commit 961213ba52
1 changed files with 1 additions and 1 deletions

View File

@ -73,6 +73,7 @@ Report.add_report('post_edits') do |report|
ON editor.id = pr.user_id ON editor.id = pr.user_id
/*join*/ /*join*/
/*where*/ /*where*/
ORDER BY pr.created_at ASC
/*limit*/ /*limit*/
SQL SQL
@ -88,7 +89,6 @@ Report.add_report('post_edits') do |report|
builder.where("editor.id > 0 AND editor.id != author.id") builder.where("editor.id > 0 AND editor.id != author.id")
builder.where("pr.created_at >= :start_date", start_date: report.start_date) builder.where("pr.created_at >= :start_date", start_date: report.start_date)
builder.where("pr.created_at <= :end_date", end_date: report.end_date) builder.where("pr.created_at <= :end_date", end_date: report.end_date)
builder.limit(report.limit || 20)
result = builder.query result = builder.query