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/discussions.rb')
-rw-r--r--lib/api/discussions.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/discussions.rb b/lib/api/discussions.rb
index 768ffac41ce..45466a1894c 100644
--- a/lib/api/discussions.rb
+++ b/lib/api/discussions.rb
@@ -122,7 +122,7 @@ module API
note = create_note(noteable, opts)
- if note.valid?
+ if note.persisted?
present note.discussion, with: Entities::Discussion
else
bad_request!("Note #{note.errors.messages}")
@@ -175,7 +175,7 @@ module API
}
note = create_note(noteable, opts)
- if note.valid?
+ if note.persisted?
present note, with: Entities::Note
else
bad_request!("Note #{note.errors.messages}")