forked from jasder/forgeplus
修改错误
This commit is contained in:
parent
3d6155c3b2
commit
0771b2783c
|
@ -62,6 +62,8 @@ class SyncForgeJob < ApplicationJob
|
||||||
|
|
||||||
owner_params = owner_params&.except!(*keys_to_delete)
|
owner_params = owner_params&.except!(*keys_to_delete)
|
||||||
user_password = random_password
|
user_password = random_password
|
||||||
|
new_user = []
|
||||||
|
if owner_params.present?
|
||||||
if User.exists?(login: owner_params["login"])
|
if User.exists?(login: owner_params["login"])
|
||||||
new_user = User.find_by(login: owner_params["login"])
|
new_user = User.find_by(login: owner_params["login"])
|
||||||
else
|
else
|
||||||
|
@ -87,13 +89,14 @@ class SyncForgeJob < ApplicationJob
|
||||||
if new_user.save!
|
if new_user.save!
|
||||||
if owner_extension_params.present?
|
if owner_extension_params.present?
|
||||||
owner_extension_params = owner_extension_params["user_extensions"] if old_version_source.include?(platform) #trustie上需要
|
owner_extension_params = owner_extension_params["user_extensions"] if old_version_source.include?(platform) #trustie上需要
|
||||||
|
|
||||||
owner_extension_params = owner_extension_params&.except!(*keys_other_delete).merge(user_id: new_user.id)
|
owner_extension_params = owner_extension_params&.except!(*keys_other_delete).merge(user_id: new_user.id)
|
||||||
UserExtension.create!(owner_extension_params)
|
UserExtension.create!(owner_extension_params)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
Rails.logger.info("#######______sync_user_end__########")
|
Rails.logger.info("#######______sync_user_end__########")
|
||||||
|
end
|
||||||
|
|
||||||
new_user
|
new_user
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue