DEV: Rescue from ActiveRecord::Readonly error in lograge.

This commit is contained in:
Guo Xiang Tan 2020-06-25 10:25:28 +08:00
parent 9c7d3b2dc0
commit 42a6c8a85f
No known key found for this signature in database
GPG Key ID: FBD110179AAC1F20
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ if (Rails.env.production? && SiteSetting.logging_provider == 'lograge') || (ENV[
if controller.respond_to?(:current_user)
controller.current_user&.username
end
rescue Discourse::InvalidAccess, Discourse::ReadOnly
rescue Discourse::InvalidAccess, Discourse::ReadOnly, ActiveRecord::ReadOnlyError
nil
end