DEV: Prefer .pluck_first over .pluck.first (#13607)

This commit is contained in:
Dan Ungureanu
2021-07-02 05:03:54 +03:00
committed by GitHub
parent 3db4ed113b
commit 6ea4bbd2ec
4 changed files with 7 additions and 7 deletions

View File

@ -59,7 +59,7 @@ module ImportScripts
def find_username_by_import_id(import_id)
user_id = user_id_from_imported_user_id(import_id)
User.where(id: user_id).pluck(:username).first if user_id.present?
User.where(id: user_id).pluck_first(:username) if user_id.present?
end
# Get the Discourse Category id based on the id of the source category