From fba9bbb18c05e5042e98b165b1bd3f8c3920c9f8 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Mon, 26 Jun 2017 11:19:03 +0530 Subject: [PATCH] FIX: reset likes in user directory Reset likes to 0 when `posts:delete_all_likes` task is ran --- lib/tasks/posts.rake | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tasks/posts.rake b/lib/tasks/posts.rake index 0c157fe3943..0338f3c9fcc 100644 --- a/lib/tasks/posts.rake +++ b/lib/tasks/posts.rake @@ -185,5 +185,6 @@ task 'posts:delete_all_likes' => :environment do end UserStat.update_all(likes_given: 0, likes_received: 0) # clear user likes stats + DirectoryItem.update_all(likes_given: 0, likes_received: 0) # clear user directory likes stats puts "", "#{likes_deleted} likes deleted!", "" end