summaryrefslogtreecommitdiff
path: root/lib/banzai
diff options
context:
space:
mode:
authorAdam Niedzielski <adamsunday@gmail.com>2016-10-28 11:31:45 +0200
committerAdam Niedzielski <adamsunday@gmail.com>2016-10-28 11:31:45 +0200
commite2c603696a9647c15cd154156f13d0e203a930f1 (patch)
tree22f64b82526f74fabb9009db8f6932c4e8d74d12 /lib/banzai
parent20a7db4483904c7280093a0309a63dfd1b7ef72e (diff)
downloadgitlab-ce-e2c603696a9647c15cd154156f13d0e203a930f1.tar.gz
Pass user instance to Labels::FindOrCreateService or skip_authorization: trueadam-fix-labels-find-or-create
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/banzai')
-rw-r--r--lib/banzai/filter/label_reference_filter.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/banzai/filter/label_reference_filter.rb b/lib/banzai/filter/label_reference_filter.rb
index c24831e68ee..9f9a96cdc65 100644
--- a/lib/banzai/filter/label_reference_filter.rb
+++ b/lib/banzai/filter/label_reference_filter.rb
@@ -39,7 +39,7 @@ module Banzai
end
def find_labels(project)
- LabelsFinder.new(nil, project_id: project.id).execute(authorized_only: false)
+ LabelsFinder.new(nil, project_id: project.id).execute(skip_authorization: true)
end
# Parameters to pass to `Label.find_by` based on the given arguments