From f4ed535e16e70f130db53073e4032642596c1e68 Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Wed, 22 Jan 2025 19:34:57 -0800 Subject: [PATCH] Update the query for fileset in user stat importer This commit will change the query for fileset to using the Valkyrie way. --- app/services/hyrax/user_stat_importer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/hyrax/user_stat_importer.rb b/app/services/hyrax/user_stat_importer.rb index d22e72d7af..a2c02fd1b0 100644 --- a/app/services/hyrax/user_stat_importer.rb +++ b/app/services/hyrax/user_stat_importer.rb @@ -49,7 +49,7 @@ def sorted_users def process_files(stats, user, start_date) file_ids_for_user(user).each do |file_id| - file = ::FileSet.find(file_id) + file = Hyrax.query_service.find_by(id: file_id) view_stats = extract_stats_for(object: file, from: FileViewStat, start_date: start_date, user: user) stats = tally_results(view_stats, :views, stats) if view_stats.present? delay