DEV: Rescue from readonly error in lograge.

This commit is contained in:
Guo Xiang Tan 2019-01-21 14:20:19 +08:00
parent 4466fcf1bc
commit eb9565d8fc
1 changed files with 1 additions and 1 deletions

View File

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