2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-04 08:47:37 +08:00

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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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