更新repository的type

This commit is contained in:
huang 2015-11-02 17:50:44 +08:00
parent 36d61cd82f
commit f4b12d191a
1 changed files with 7 additions and 1 deletions

View File

@ -7,10 +7,16 @@ namespace :rep_fault do
if project.repositories.count > 0
unless Repository.where("project_id =? and type = ?",project, "Repository::Gitlab").blank?
project.repositories.each do |repository|
repository.update_attributes(:is_default => true)
repository.update_attributes(:is_default => false)
end
end
end
end
end
desc "update ossean's data"
task :update_type => :environment do
repository = Repository.find(400)
repository.update_attributes(:type => "Repository::Git")
end
end