diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-03-21 18:28:47 +0300 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-05 19:44:14 +0300 |
commit | 874413cf701870a0fc1051f7c0a5fc4b4f884657 (patch) | |
tree | 6cb2917f6a72fc918c8f28d884597f36fe0de34b /app/services/notes | |
parent | 79889a6aa3dc878d196d0f2f445ab6b10ef10c74 (diff) |
Fix specs
Diffstat (limited to 'app/services/notes')
-rw-r--r-- | app/services/notes/build_service.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/notes/build_service.rb b/app/services/notes/build_service.rb index 8d5a022d319..eddfcf5f391 100644 --- a/app/services/notes/build_service.rb +++ b/app/services/notes/build_service.rb @@ -2,6 +2,8 @@ module Notes class BuildService < BaseService def execute in_reply_to_discussion_id = params.delete(:in_reply_to_discussion_id) + new_discussion = params.delete(:new_discussion) + if project && in_reply_to_discussion_id.present? discussion = project.notes.find_original_discussion(in_reply_to_discussion_id) || @@ -14,7 +16,7 @@ module Notes end params.merge!(discussion.reply_attributes) - elsif params.delete(:new_discussion) + elsif new_discussion # TODO: Remove when we use a selectbox instead of a submit button params[:type] = DiscussionNote.name end |