[refs #579] fix checking path
This commit is contained in:
parent
fcfdf1b26b
commit
a5477926bc
|
@ -68,7 +68,8 @@ class Projects::CommentsController < Projects::BaseController
|
|||
@comment.data[:to_commit], @comment.data[:from_commit] = to_commit, from_commit
|
||||
|
||||
diff = pull.diff repo, to_commit, from_commit
|
||||
return false unless diff_path = diff.select {|d| d.a_path == params[:path]}
|
||||
diff_path = diff.select {|d| d.a_path == params[:path]}
|
||||
return false if diff_path.blank?
|
||||
comment_line = params[:line].to_i
|
||||
return false if comment_line == 0 # NB! also dont want create comment to the diff header
|
||||
|
||||
|
|
Loading…
Reference in New Issue