mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 23:15:01 +08:00
DEV: Rescue from readonly error in lograge.
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user