Fix Chewy::UndefinedUpdateStrategy in dev:populate_sample_data task when Elasticsearch is enabled (#35615)

This commit is contained in:
Claire 2025-07-31 14:34:21 +02:00 committed by GitHub
parent 2dfdcc7dcb
commit f7388af721
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,6 +3,7 @@
namespace :dev do
desc 'Populate database with test data. Can be run multiple times. Should not be run in production environments'
task populate_sample_data: :environment do
Chewy.strategy(:mastodon) do
# Create a valid account to showcase multiple post types
showcase_account = Account.create_with(username: 'showcase_account').find_or_create_by!(id: 10_000_000)
showcase_user = User.create_with(
@ -420,3 +421,4 @@ namespace :dev do
).find_or_create_by!(id: 10_000_012)
end
end
end