FIX: reset likes in user directory
Reset likes to 0 when `posts:delete_all_likes` task is ran
This commit is contained in:
parent
7ed9fbb415
commit
fba9bbb18c
|
@ -185,5 +185,6 @@ task 'posts:delete_all_likes' => :environment do
|
||||||
end
|
end
|
||||||
|
|
||||||
UserStat.update_all(likes_given: 0, likes_received: 0) # clear user likes stats
|
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!", ""
|
puts "", "#{likes_deleted} likes deleted!", ""
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue