diff options
Diffstat (limited to 'lib/api/helpers/label_helpers.rb')
-rw-r--r-- | lib/api/helpers/label_helpers.rb | 4 |
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) |