From 255cd31652f1afda5cd1c075526bbe3ee56a708e Mon Sep 17 00:00:00 2001
From: James Lopez <james@jameslopez.es>
Date: Fri, 1 Apr 2016 17:27:07 +0200
Subject: [PATCH] fixes after more import testing

---
 lib/gitlab/bitbucket_import/client.rb | 2 +-
 lib/gitlab/gitlab_import/importer.rb  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/gitlab/bitbucket_import/client.rb b/lib/gitlab/bitbucket_import/client.rb
index 1d1bd5e321..acd0f298b3 100644
--- a/lib/gitlab/bitbucket_import/client.rb
+++ b/lib/gitlab/bitbucket_import/client.rb
@@ -6,7 +6,7 @@ module Gitlab
       attr_reader :consumer, :api
 
       def self.from_project(project)
-        credentials = project.import_data.credentials if project.import_data
+        credentials = project.import_data.stringified_credentials if project.import_data
         if defined?(credentials) && credentials['bb_session']
           token = credentials['bb_session']['bitbucket_access_token']
           token_secret = credentials['bb_session']['bitbucket_access_token_secret']
diff --git a/lib/gitlab/gitlab_import/importer.rb b/lib/gitlab/gitlab_import/importer.rb
index afc06d01eb..19dc79462c 100644
--- a/lib/gitlab/gitlab_import/importer.rb
+++ b/lib/gitlab/gitlab_import/importer.rb
@@ -5,7 +5,7 @@ module Gitlab
 
       def initialize(project)
         @project = project
-        credentials = import_data.credentials
+        credentials = import_data.stringified_credentials
         if credentials && credentials["password"]
           @client = Client.new(credentials["password"])
           @formatter = Gitlab::ImportFormatter.new
-- 
2.30.9