From 5f88df5a2a19a67bf350d21fa54142bf6a109528 Mon Sep 17 00:00:00 2001 From: chiu Date: Fri, 4 Sep 2020 17:50:40 +0800 Subject: [PATCH] Delete the duplicated personal books.(The items which have "Pages" filled in add to the delete list.) --- lib/tasks/sync_ntnu_personal_data_tasks.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/sync_ntnu_personal_data_tasks.rake b/lib/tasks/sync_ntnu_personal_data_tasks.rake index efa69a8..120a983 100644 --- a/lib/tasks/sync_ntnu_personal_data_tasks.rake +++ b/lib/tasks/sync_ntnu_personal_data_tasks.rake @@ -455,7 +455,7 @@ namespace :sync_ntnu_personal_plugins do tmp && (tmp1 || tmp2 || tmp3 || tmp4) end if books_for_user.count != 0 - Book.where(member_profile_id: user.member_profile_id,:pages=>nil).destroy + Book.where(member_profile_id: user.member_profile_id).destroy end NtnuSyncPlugin.sync_academic_treatise_books(query_result, user) NtnuSyncPlugin.sync_academic_book_chapters(query_result, user)