about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-12-23 00:04:52 +0100
committerGitHub <noreply@github.com>2020-12-23 00:04:52 +0100
commit2ab3e91eaf6c386f3933d79007ca87215397f06c (patch)
tree709164d9e01058ecf4033d891548705b2a66ed85
parent3249d35bdcd9a495af3277dfb4b2129d7ef80f15 (diff)
Fix BatchedRemoveStatusService not working without ES in rails console (#15408)
Not a huge deal but may cause surprising failures in custom scripts and
development.

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
-rw-r--r--app/services/batched_remove_status_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/batched_remove_status_service.rb b/app/services/batched_remove_status_service.rb
index 61617d958..5000062e4 100644
--- a/app/services/batched_remove_status_service.rb
+++ b/app/services/batched_remove_status_service.rb
@@ -31,7 +31,7 @@ class BatchedRemoveStatusService < BaseService
 
     # Since we skipped all callbacks, we also need to manually
     # deindex the statuses
-    Chewy.strategy.current.update(StatusesIndex, statuses_and_reblogs)
+    Chewy.strategy.current.update(StatusesIndex, statuses_and_reblogs) if Chewy.enabled?
 
     return if options[:skip_side_effects]