Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
c5555c8a
Commit
c5555c8a
authored
Jul 15, 2016
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't fail when a LegacyDiffNote didn't store the right diff
parent
fbd75c35
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/models/legacy_diff_note.rb
app/models/legacy_diff_note.rb
+2
-2
app/views/notify/note_merge_request_email.html.haml
app/views/notify/note_merge_request_email.html.haml
+1
-1
No files found.
app/models/legacy_diff_note.rb
View file @
c5555c8a
...
...
@@ -38,7 +38,7 @@ class LegacyDiffNote < Note
end
def
diff_line
@diff_line
||=
diff_file
.
line_for_line_code
(
self
.
line_code
)
@diff_line
||=
diff_file
.
line_for_line_code
(
self
.
line_code
)
if
diff_file
end
def
for_line?
(
line
)
...
...
@@ -55,7 +55,7 @@ class LegacyDiffNote < Note
def
active?
return
@active
if
defined?
(
@active
)
return
true
if
for_commit?
return
true
unless
self
.
diff
return
true
unless
diff_line
return
false
unless
noteable
noteable_diff
=
find_noteable_diff
...
...
app/views/notify/note_merge_request_email.html.haml
View file @
c5555c8a
-
if
@note
.
diff_note?
-
if
@note
.
diff_note?
&&
@note
.
diff_file
%p
.details
New comment on diff for
=
link_to
@note
.
diff_file
.
file_path
,
@target_url
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment