summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-03 18:59:04 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-10-19 14:58:25 -0200
commit11d786e7da9f767a877bbdd4fd482c0d0c4cd747 (patch)
tree5af278740f217a1e4eef7e6c7a056606ac6831d2 /lib
parent9629bb962cd3666ac58cfbaba9d79df011221f41 (diff)
downloadgitlab-ce-11d786e7da9f767a877bbdd4fd482c0d0c4cd747.tar.gz
Use try instead of ternary operator on Gitlab::ImportExport::ProjectTreeRestorer
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/import_export/project_tree_restorer.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/gitlab/import_export/project_tree_restorer.rb b/lib/gitlab/import_export/project_tree_restorer.rb
index accac5325f8..7cdba880a93 100644
--- a/lib/gitlab/import_export/project_tree_restorer.rb
+++ b/lib/gitlab/import_export/project_tree_restorer.rb
@@ -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