From 5612c6b55a86d3f25b97bd2888dccaf16c4b9ac0 Mon Sep 17 00:00:00 2001 From: Guillermo Prandi Date: Wed, 25 Sep 2019 00:06:39 -0300 Subject: [PATCH] Fix nil ref --- 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 3631bf3246ad7..1cc0bcfe6a11e 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