mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 19:39:30 +08:00
FIX: better handling of no prev30Days (#6301)
This commit is contained in:
@ -217,8 +217,9 @@ class Report
|
||||
report.icon = 'user'
|
||||
|
||||
basic_report_about report, UserVisit, :by_day, report.start_date, report.end_date, report.group_id
|
||||
|
||||
add_counts report, UserVisit, 'visited_at'
|
||||
|
||||
report.prev30Days = UserVisit.where(mobile: true).where("visited_at >= ? and visited_at < ?", report.start_date - 30.days, report.start_date).count
|
||||
end
|
||||
|
||||
def self.report_mobile_visits(report)
|
||||
|
Reference in New Issue
Block a user