diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-24 20:10:56 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-24 20:10:56 +0000 |
commit | b542c8ae344bbdd763d10afdcd6921fd268b7832 (patch) | |
tree | 3201c706f5495eb5feca0aaf49d28a00130b53a2 /app | |
parent | 9119206b6e8aefc4ae25a0d366e7a9788c0a2abd (diff) | |
download | gitlab-ce-b542c8ae344bbdd763d10afdcd6921fd268b7832.tar.gz |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'app')
-rw-r--r-- | app/services/discussions/capture_diff_note_position_service.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/services/discussions/capture_diff_note_position_service.rb b/app/services/discussions/capture_diff_note_position_service.rb index 4e8fd90a2e7..87aa27e455f 100644 --- a/app/services/discussions/capture_diff_note_position_service.rb +++ b/app/services/discussions/capture_diff_note_position_service.rb @@ -19,13 +19,16 @@ module Discussions position = result[:position] return unless position + line_code = position.line_code(project.repository) + return unless line_code + # Currently position data is copied across all notes of a discussion # It makes sense to store a position only for the first note instead # Within the newly introduced table we can start doing just that DiffNotePosition.create_or_update_for(discussion.notes.first, diff_type: :head, position: position, - line_code: position.line_code(project.repository)) + line_code: line_code) end private |