DEV: Move OAuth2UserInfo deprecation to after_save (#15704)

We initialize models as part of the warmup process in production, so this was being logged on every boot. We only want to log if a plugin is actually using the model, so after_save is a safer bet.
This commit is contained in:
David Taylor 2022-01-25 10:29:31 +00:00 committed by GitHub
parent 5dd8b827e8
commit c6f8729b5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@
class Oauth2UserInfo < ActiveRecord::Base
belongs_to :user
after_initialize do
before_save do
Discourse.deprecate("Oauth2UserInfo is deprecated. Use `ManagedAuthenticator` and `UserAssociatedAccount` instead. For more information, see https://meta.discourse.org/t/106695", drop_from: '2.9.0', output_in_test: true)
end
end