fixed 补偿users.gitea_uid不存在的用户,error message
This commit is contained in:
parent
9f4d9aa5db
commit
9449bd6eb9
|
@ -17,7 +17,7 @@ namespace :repair_gitea_user do
|
|||
user.save!
|
||||
success_count = success_count + 1
|
||||
else
|
||||
if interactor.result['message'].present? && interactor.result['message'].to_s.include?("user already exists")
|
||||
if interactor.result[:message].present? && interactor.result[:message].to_s.include?("user already exists")
|
||||
uid = ActiveRecord::Base.connection.query_value("SELECT id FROM forgegitea.`user` WHERE forgegitea.`user`.name='#{user.login}' and forgegitea.`user`.email='#{user.mail}'")
|
||||
if uid.present?
|
||||
result = Gitea::User::GenerateTokenService.call(user.login, "abc12345678" )
|
||||
|
|
Loading…
Reference in New Issue