summaryrefslogtreecommitdiffstats
path: root/models/issue_xref.go
diff options
context:
space:
mode:
authorguillep2k <18600385+guillep2k@users.noreply.github.com>2019-09-25 00:57:06 -0300
committerLauris BH <lauris.buksis@zzdats.lv>2019-09-25 06:57:06 +0300
commitc05b89a5aaea7c3a7db9b602693556cde725a30f (patch)
treefe612e048a44ecf1498ffe76d6bfe7120283a9fd /models/issue_xref.go
parentb19db40eab5d8d40e38d9358baa604761506732d (diff)
downloadgitea-c05b89a5aaea7c3a7db9b602693556cde725a30f.tar.gz
gitea-c05b89a5aaea7c3a7db9b602693556cde725a30f.zip
Fix nil ref (#8281)
Diffstat (limited to 'models/issue_xref.go')
-rw-r--r--models/issue_xref.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/issue_xref.go b/models/issue_xref.go
index 3631bf3246..1cc0bcfe6a 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