Skip to content

Commit 23ccd78

Browse files
committed
Only preload community & user for error logs after getting available types
1 parent d34c680 commit 23ccd78

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

app/controllers/admin_controller.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ def error_reports
1515
ErrorLog.all
1616
else
1717
ErrorLog.where(community: RequestContext.community)
18-
end.includes(:community, :user)
18+
end
1919

2020
@error_types = base_scope.select(:klass).distinct.to_a.map(&:klass)
2121

22+
base_scope = base_scope.includes(:community, :user)
23+
2224
if params[:type].present?
2325
base_scope = base_scope.where(klass: params[:type])
2426
end

0 commit comments

Comments
 (0)