Commit bf484ffe authored by James Lopez's avatar James Lopez

fix bad refactoring of import data credentials

parent adc64e45
...@@ -5,9 +5,9 @@ module Gitlab ...@@ -5,9 +5,9 @@ module Gitlab
def initialize(project) def initialize(project)
@project = project @project = project
credentials = project.import_data import_data = project.import_data
if credentials && credentials[:password] if import_data && import_data.credentials && import_data.credentials[:password]
@client = Client.new(credentials[:password]) @client = Client.new(import_data.credentials[:password])
@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}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment