科技部项目同步木兰镜像用户

This commit is contained in:
xiaoxiaoqiong 2022-01-05 15:32:46 +08:00
parent 34af5a59eb
commit 67020b7e73
1 changed files with 2 additions and 2 deletions

View File

@ -42,10 +42,10 @@ namespace :sync_mulan_repo do
def create_repo(data)
data.each_with_index do |row, index|
begin
user_id = 110
user = User.find 109
tags = row['Tags']
repository_name = row['Url'].split("/").last
project = Project.where(user_id: user_id).where(identifier: repository_name)
project = Project.where(user_id: 110).where(identifier: repository_name)
unless project.present?
p_category = ProjectCategory.where(name: tags.split(",")).first
p_category = ProjectCategory.find_by(name: '其他') if p_category.blank?