DEV: Fix build (#30600)

The `faker` gem, which is a dependency for the `*:populate` rake tasks, isn't installed in the production environment, so we should only load files/classes related to those rake tasks in non-production environments.
This commit is contained in:
Osama Sayegh 2025-01-07 03:37:03 +03:00 committed by GitHub
parent 5202532acb
commit 7df1fac68b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -513,7 +513,9 @@ after_initialize do
# removed. Depending on the channel, uploads may end up being secure.
UploadSecurity.register_custom_public_type("chat-composer")
DiscoursePluginRegistry.discourse_dev_populate_reviewable_types.add DiscourseDev::ReviewableMessage
if Rails.env.local?
DiscoursePluginRegistry.discourse_dev_populate_reviewable_types.add DiscourseDev::ReviewableMessage
end
end
if Rails.env == "test"