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/notes.rb')
-rw-r--r--lib/api/notes.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/notes.rb b/lib/api/notes.rb
index 8ce875cdc03..70b4a3735e3 100644
--- a/lib/api/notes.rb
+++ b/lib/api/notes.rb
@@ -98,7 +98,7 @@ module API
if note.errors.attribute_names == [:commands_only, :command_names]
status 202
present note, with: Entities::NoteCommands
- elsif note.valid?
+ elsif note.persisted?
present note, with: Entities.const_get(note.class.name, false)
else
note.errors.delete(:commands_only) if note.errors.has_key?(:commands)