summaryrefslogtreecommitdiff
path: root/app/services/notes/create_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/notes/create_service.rb')
-rw-r--r--app/services/notes/create_service.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/services/notes/create_service.rb b/app/services/notes/create_service.rb
index 5a6e7338b42..a1aa1f694bf 100644
--- a/app/services/notes/create_service.rb
+++ b/app/services/notes/create_service.rb
@@ -8,9 +8,9 @@ module Notes
note = Notes::BuildService.new(project, current_user, params).execute
# n+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/37440
- note_valid = Gitlab::GitalyClient.allow_n_plus_1_calls do
+ note_valid = Gitlab::GitalyClient.allow_n_plus_1_calls {
note.valid?
- end
+ }
return note unless note_valid
@@ -20,7 +20,7 @@ module Notes
quick_actions_service = QuickActionsService.new(project, current_user)
if quick_actions_service.supported?(note)
- options = { merge_request_diff_head_sha: merge_request_diff_head_sha }
+ options = {merge_request_diff_head_sha: merge_request_diff_head_sha}
content, command_params = quick_actions_service.extract_commands(note, options)
only_commands = content.empty?
@@ -49,7 +49,7 @@ module Notes
# We must add the error after we call #save because errors are reset
# when #save is called
if only_commands
- note.errors.add(:commands_only, 'Commands applied')
+ note.errors.add(:commands_only, "Commands applied")
end
note.commands_changes = command_params