mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
FIX: thor populate:posts tool needs to use find_by_username
This commit is contained in:
parent
55249750ff
commit
79e37ad1a8
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ class Populate < Thor
|
|||
def posts
|
||||
require './config/environment'
|
||||
|
||||
users = User.find_all_by_username_lower(options[:users].map(&:downcase))
|
||||
users = options[:users].map { |u| User.find_by_username(u.downcase) }
|
||||
if users.length != options[:users].length
|
||||
not_found = options[:users].map(&:downcase) - users.map(&:username_lower)
|
||||
puts "No user found for these usernames: #{not_found.join(', ')}"
|
||||
|
|
Loading…
Reference in a new issue