diff options
author | Valery Sizov <valery@gitlab.com> | 2016-12-30 17:30:01 +0200 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2016-12-30 17:42:27 +0200 |
commit | 95047f1dc7109ea7e5ebead4115ec01bb8a75ba3 (patch) | |
tree | 2ee6991fdfd27ef279996f11105534859e642655 /app/models/merge_request.rb | |
parent | c2173a1464abe4048486ffe350ad65545ce239ce (diff) | |
download | gitlab-ce-95047f1dc7109ea7e5ebead4115ec01bb8a75ba3.tar.gz |
Make diff discussion more reliablefix_broken_diff_discussions
Diffstat (limited to 'app/models/merge_request.rb')
-rw-r--r-- | app/models/merge_request.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 61845bf4036..83f752d6826 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -861,9 +861,11 @@ class MergeRequest < ActiveRecord::Base paths: paths ) - active_diff_notes.each do |note| - service.execute(note) - Gitlab::Timeless.timeless(note, &:save) + transaction do + active_diff_notes.each do |note| + service.execute(note) + Gitlab::Timeless.timeless(note, &:save) + end end end |