]> cat aescling's git repositories - mastodon.git/commitdiff
Fix BatchedRemoveStatusService not working without ES in rails console (#15408)
authorThibG <thib@sitedethib.com>
Tue, 22 Dec 2020 23:04:52 +0000 (00:04 +0100)
committerGitHub <noreply@github.com>
Tue, 22 Dec 2020 23:04:52 +0000 (00:04 +0100)
Not a huge deal but may cause surprising failures in custom scripts and
development.

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
app/services/batched_remove_status_service.rb

index 61617d958d7d43d4468072dec8046faecdd69dd9..5000062e41a5035af4a9f08c0937491864ff98e7 100644 (file)
@@ -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]