Update seed file (#19480)

This commit is contained in:
Mac Siri 2023-05-18 07:53:48 -04:00 committed by GitHub
parent 94ba297c43
commit a475fb9169
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,6 +18,7 @@ puts "Seeding with multiplication factor: #{SEEDS_MULTIPLIER}\n\n"
Settings::UserExperience.public = true
Settings::General.waiting_on_first_user = false
Settings::Authentication.providers = Authentication::Providers.available
Settings::Authentication.allow_email_password_registration = true
##############################################################################
@ -253,7 +254,7 @@ seeder.create_if_none(Article, num_articles) do
article = Article.create!(
body_markdown: markdown,
featured: true,
featured: i.zero?, # only feature the first article,
show_comments: true,
user_id: User.order(Arel.sql("RANDOM()")).first.id,
)