From 6545c567c204f29b07be0273fd60a88962b616de Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Thu, 7 Dec 2023 15:16:23 -0500 Subject: [PATCH] bug fix, i need to not dup the logic three times! --- app/controllers/api/v1/books/refresh_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/v1/books/refresh_controller.rb b/app/controllers/api/v1/books/refresh_controller.rb index 2e0a38177..1e802fb47 100644 --- a/app/controllers/api/v1/books/refresh_controller.rb +++ b/app/controllers/api/v1/books/refresh_controller.rb @@ -24,7 +24,7 @@ def update next unless count_of_judgements.positive? rating = Rating.find_or_initialize_by(query: query, doc_id: query_doc_pair.doc_id) - + rating.user = query_doc_pair.judgements.last.user if rating.user.nil? rating.rating = if @book.support_implicit_judgements? summed_rating / count_of_judgements else