fix github import issues

This commit is contained in:
James Lopez 2016-04-01 15:51:54 +02:00
parent 6d12d79d29
commit 6aeb753ba8
2 changed files with 2 additions and 2 deletions

View file

@ -418,7 +418,7 @@ class Project < ActiveRecord::Base
def create_or_update_import_data(credentials) def create_or_update_import_data(credentials)
project_import_data = import_data || build_import_data project_import_data = import_data || build_import_data
project_import_data.credentials ||= {} project_import_data.credentials ||= {}
project_import_data.credentials.merge!(credentials) project_import_data.credentials = project_import_data.credentials.merge(credentials)
project_import_data.save project_import_data.save
end end

View file

@ -8,7 +8,7 @@ module Gitlab
def initialize(project) def initialize(project)
@project = project @project = project
if import_data_credentials if import_data_credentials
@client = Client.new(import_data_credentials['user']) @client = Client.new(import_data_credentials[:user])
@formatter = Gitlab::ImportFormatter.new @formatter = Gitlab::ImportFormatter.new
else else
raise Projects::ImportService::Error, "Unable to find project import data credentials for project ID: #{@project.id}" raise Projects::ImportService::Error, "Unable to find project import data credentials for project ID: #{@project.id}"