summaryrefslogtreecommitdiff
path: root/app/services/notes/update_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/notes/update_service.rb')
-rw-r--r--app/services/notes/update_service.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/notes/update_service.rb b/app/services/notes/update_service.rb
index 3070e7b0e53..ed08f693901 100644
--- a/app/services/notes/update_service.rb
+++ b/app/services/notes/update_service.rb
@@ -55,6 +55,8 @@ module Notes
# We must add the error after we call #save because errors are reset
# when #save is called
note.errors.add(:commands_only, message.presence || _('Commands did not apply'))
+ # Allow consumers to detect problems applying commands
+ note.errors.add(:commands, _('Commands did not apply')) unless message.present?
Notes::DestroyService.new(project, current_user).execute(note)
end