summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-06-10 16:34:47 +0100
committerNick Thomas <nick@gitlab.com>2019-06-13 16:30:29 +0100
commit7639b5801ce7fa6f91f8b309923594eeacc62490 (patch)
treeb274d4b83fe0033d8a021c2dbbf72afad3a57579
parent0a70ba177e4589733659dd5af85402d0a3081026 (diff)
downloadgitlab-ce-7639b5801ce7fa6f91f8b309923594eeacc62490.tar.gz
Raise an error if creating the MergeRequestDiff fails
-rw-r--r--app/models/merge_request.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index 7481f1939ad..f07636e8f77 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -668,7 +668,7 @@ class MergeRequest < ApplicationRecord
# n+1: https://gitlab.com/gitlab-org/gitlab-ce/issues/37435
Gitlab::GitalyClient.allow_n_plus_1_calls do
- merge_request_diffs.create
+ merge_request_diffs.create!
reload_merge_request_diff
end
end