From c05b89a5aaea7c3a7db9b602693556cde725a30f Mon Sep 17 00:00:00 2001 From: guillep2k <18600385+guillep2k@users.noreply.github.com> Date: Wed, 25 Sep 2019 00:57:06 -0300 Subject: [PATCH] Fix nil ref (#8281) --- models/issue_xref.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/issue_xref.go b/models/issue_xref.go index 3631bf324..1cc0bcfe6 100644 --- a/models/issue_xref.go +++ b/models/issue_xref.go @@ -197,7 +197,7 @@ func (issue *Issue) isValidCommentReference(e Engine, ctx *crossReferencesContex return nil, err } // Check user permissions - if refIssue.Repo.ID != ctx.OrigIssue.Repo.ID { + if refIssue.RepoID != ctx.OrigIssue.RepoID { perm, err := getUserRepoPermission(e, refIssue.Repo, ctx.Doer) if err != nil { return nil, err