Use try instead of ternary operator on Gitlab::ImportExport::ProjectTreeRestorer
This commit is contained in:
parent
9629bb962c
commit
11d786e7da
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue