From 6aeb753ba81c857c23d29f9d4c5e22aaeed737dc Mon Sep 17 00:00:00 2001
From: James Lopez <james@jameslopez.es>
Date: Fri, 1 Apr 2016 15:51:54 +0200
Subject: [PATCH] fix github import issues

---
 app/models/project.rb                | 2 +-
 lib/gitlab/github_import/importer.rb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/models/project.rb b/app/models/project.rb
index 52f70256be3..941e444a4f8 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -418,7 +418,7 @@ class Project < ActiveRecord::Base
   def create_or_update_import_data(credentials)
     project_import_data = import_data || build_import_data
     project_import_data.credentials ||= {}
-    project_import_data.credentials.merge!(credentials)
+    project_import_data.credentials = project_import_data.credentials.merge(credentials)
     project_import_data.save
   end
 
diff --git a/lib/gitlab/github_import/importer.rb b/lib/gitlab/github_import/importer.rb
index a5d3ab5fcf1..0b1ed510229 100644
--- a/lib/gitlab/github_import/importer.rb
+++ b/lib/gitlab/github_import/importer.rb
@@ -8,7 +8,7 @@ module Gitlab
       def initialize(project)
         @project = project
         if import_data_credentials
-          @client = Client.new(import_data_credentials['user'])
+          @client = Client.new(import_data_credentials[:user])
           @formatter = Gitlab::ImportFormatter.new
         else
           raise Projects::ImportService::Error, "Unable to find project import data credentials for project ID: #{@project.id}"
-- 
GitLab