Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/helpers/label_helpers.rb')
-rw-r--r--lib/api/helpers/label_helpers.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/helpers/label_helpers.rb b/lib/api/helpers/label_helpers.rb
index b3ba962666f..e27278f5681 100644
--- a/lib/api/helpers/label_helpers.rb
+++ b/lib/api/helpers/label_helpers.rb
@@ -107,7 +107,9 @@ module API
authorize! :admin_label, label
- destroy_conditionally!(label)
+ return if destroy_conditionally!(label)
+
+ render_api_error!('Label is locked and was not removed', 400)
end
def promote_label(parent)