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

pull/35616/head
Claire 3 months ago committed by GitHub
parent 2dfdcc7dcb
commit f7388af721
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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

Loading…
Cancel
Save