Use try instead of ternary operator on Gitlab::ImportExport::ProjectTreeRestorer

This commit is contained in:
Douglas Barbosa Alexandre 2016-10-03 18:59:04 -03:00
parent 9629bb962c
commit 11d786e7da
1 changed files with 1 additions and 2 deletions

View File

@ -120,8 +120,7 @@ module Gitlab
end
def parsed_relation_hash(relation_hash)
group_id = restored_project.group ? restored_project.group.id : nil
relation_hash.merge!('group_id' => group_id, 'project_id' => restored_project.id)
relation_hash.merge!('group_id' => restored_project.group.try(:id), 'project_id' => restored_project.id)
end
end
end