FIX: `user_option` option can be `nil` for new users.

This commit is contained in:
Vinoth Kannan 2020-08-20 22:50:58 +05:30 committed by GitHub
parent 208d85aaff
commit f495fca7e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -179,7 +179,7 @@ after_initialize do
self.human? &&
!self.anonymous? &&
!self.staged &&
!user_option.skip_new_user_tips &&
!user_option&.skip_new_user_tips &&
!SiteSetting.discourse_narrative_bot_ignored_usernames.split('|'.freeze).include?(self.username)
end