[#19] fix error with some kind of automatic comments

This commit is contained in:
Alexander Machehin 2013-04-10 01:41:48 +06:00
parent c8084cc618
commit f7cd301479
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ class CommentPresenter < ApplicationPresenter
else
issue = Issue.where(:id => comment.created_from_issue_id).first
@referenced_issue = issue.pull_request || issue
if issue && Comment.exists?(comment.data[:comment_id])
if issue && (comment.data[:comment_id].nil? || Comment.exists?(comment.data[:comment_id]))
title = if issue == opts[:commentable]
"#{issue.serial_id}"
elsif issue.project.owner == opts[:commentable].project.owner