Skip to content

Commit 8e9970f

Browse files
authored
Merge pull request #108 from broadinstitute/development
fixing returning user count query to take last 26 weeks, not first
2 parents 1f04c48 + 97e2ee7 commit 8e9970f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/reports_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def index
9999

100100
# compute time-based breakdown of returning user counts
101101
@returning_users_by_week = {}
102-
user_timepoints = ReportTimePoint.where(name: 'Weekly Returning Users', :date.lte => today).take(26)
102+
user_timepoints = ReportTimePoint.where(name: 'Weekly Returning Users', :date.lte => today).order(date: :desc).take(26)
103103
user_timepoints.each do |timepoint|
104104
@returning_users_by_week[timepoint.date.to_s] = timepoint.value[:count]
105105
end

0 commit comments

Comments
 (0)