Delete the duplicated personal books.(The items which have "Pages" filled in add to the delete list.)

This commit is contained in:
chiu 2020-09-04 17:50:40 +08:00
parent 1aebaa68ad
commit 5f88df5a2a
1 changed files with 1 additions and 1 deletions

View File

@ -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)