fix bad refactoring of import data credentials
This commit is contained in:
parent
adc64e4583
commit
bf484ffee4
1 changed files with 3 additions and 3 deletions
|
@ -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}"
|
||||||
|
|
Loading…
Reference in a new issue