diff options
author | Adam Niedzielski <adamsunday@gmail.com> | 2016-10-28 12:31:45 +0300 |
---|---|---|
committer | Adam Niedzielski <adamsunday@gmail.com> | 2016-10-28 12:31:45 +0300 |
commit | e2c603696a9647c15cd154156f13d0e203a930f1 (patch) | |
tree | 22f64b82526f74fabb9009db8f6932c4e8d74d12 /lib/gitlab/fogbugz_import | |
parent | 20a7db4483904c7280093a0309a63dfd1b7ef72e (diff) |
Pass user instance to Labels::FindOrCreateService or skip_authorization: true
Do not pass project.owner because it may return a group and Labels::FindOrCreateService
throws an error in this case.
Fixes #23694.
Diffstat (limited to 'lib/gitlab/fogbugz_import')
-rw-r--r-- | lib/gitlab/fogbugz_import/importer.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/fogbugz_import/importer.rb b/lib/gitlab/fogbugz_import/importer.rb index 65ee85ca5a9..222bcdcbf9c 100644 --- a/lib/gitlab/fogbugz_import/importer.rb +++ b/lib/gitlab/fogbugz_import/importer.rb @@ -75,7 +75,7 @@ module Gitlab def create_label(name) params = { title: name, color: nice_label_color(name) } - ::Labels::FindOrCreateService.new(project.owner, project, params).execute + ::Labels::FindOrCreateService.new(nil, project, params).execute(skip_authorization: true) end def user_info(person_id) @@ -133,7 +133,7 @@ module Gitlab updated_at: DateTime.parse(bug['dtLastUpdated']) ) - issue_labels = ::LabelsFinder.new(project.owner, project_id: project.id, title: labels).execute + issue_labels = ::LabelsFinder.new(nil, project_id: project.id, title: labels).execute(skip_authorization: true) issue.update_attribute(:label_ids, issue_labels.pluck(:id)) import_issue_comments(issue, comments) |