This commit is contained in:
BoHung Chiu 2023-04-10 16:19:44 +08:00
parent 917c2e661b
commit 7fb3c9386b
1 changed files with 1 additions and 1 deletions

View File

@ -368,7 +368,7 @@ namespace :sync_asia_personal_plugins do
task :sync,[:user_names] => [:environment] do |task,args|
if args.user_names
user_ids = YAML.load(args.user_names)
member_ids = (MemberProfile.where(:email.in=>user_ids.map{|s| s + '@asia.edu.tw' }).pluck(:id)
member_ids = MemberProfile.where(:email.in=>user_ids.map{|s| s + '@asia.edu.tw' }).pluck(:id)
User.where(:user_name.in=>user_ids, :member_profile_id.nin=>member_ids).each do |u|
query_result = get_sync_data(u.user_name)
emp = query_result["emp"]