summaryrefslogtreecommitdiff
path: root/lib/api/boards.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/boards.rb')
-rw-r--r--lib/api/boards.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/boards.rb b/lib/api/boards.rb
index b14dd4f6e83..4ac491edc1b 100644
--- a/lib/api/boards.rb
+++ b/lib/api/boards.rb
@@ -65,8 +65,8 @@ module API
requires :label_id, type: Integer, desc: 'The ID of an existing label'
end
post '/lists' do
- unless user_project.labels.exists?(params[:label_id])
- render_api_error!({ error: "Label not found!" }, 400)
+ unless available_labels.exists?(params[:label_id])
+ render_api_error!({ error: 'Label not found!' }, 400)
end
authorize!(:admin_list, user_project)