Skip to content
Snippets Groups Projects
Commit 11d786e7 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
Browse files

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

parent 9629bb96
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment