Bugfix. Refs #112

This commit is contained in:
Pavel Chipiga 2012-01-28 06:22:29 +02:00
parent 205320c200
commit 95b566dc10
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ namespace :import do
if project = repository.projects.find_by_name(name) || repository.projects.by_name(name).first # fallback to speedup if project = repository.projects.find_by_name(name) || repository.projects.by_name(name).first # fallback to speedup
say "Found project '#{project.owner.uname}/#{project.name}'" say "Found project '#{project.owner.uname}/#{project.name}'"
elsif scoped = Project.where(:owner_id => owner.id, :owner_type => owner.class) and elsif scoped = Project.where(:owner_id => owner.id, :owner_type => owner.class) and
project = scoped.find_by_name(name).first || scoped.by_name(name).first project = scoped.find_by_name(name) || scoped.by_name(name).first
repository.projects << project repository.projects << project
say "Add project '#{project.owner.uname}/#{project.name}' to '#{platform.name}/#{repository.name}'" say "Add project '#{project.owner.uname}/#{project.name}' to '#{platform.name}/#{repository.name}'"
else else