更新repository的type
This commit is contained in:
parent
36d61cd82f
commit
f4b12d191a
|
@ -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
|
Loading…
Reference in New Issue