You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: update_service.rb
    path of file: ./repos/gitlabhq/app/services/notes
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Notes
  class UpdateService < BaseService
    def execute(note)
      return note unless note.editabl
    
    def delete_note(note, message)
      # 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