fix some things

This commit is contained in:
David Schneiderbauer 2018-06-05 09:51:03 +02:00
parent 4ea560ccad
commit abdaa54189
No known key found for this signature in database
GPG Key ID: 576113B2803B3EAB
2 changed files with 4 additions and 3 deletions

View File

@ -119,9 +119,10 @@ func createOrUpdateIssueNotifications(e Engine, issue *Issue, notificationAuthor
}
}
issue.loadRepo(e)
issue.Repo.Units = nil
for _, watch := range watches {
issue.loadRepo(e)
issue.Repo.Units = nil
if issue.IsPull && !issue.Repo.CheckUnitUser(watch.UserID, false, UnitTypePullRequests) {
continue
}

View File

@ -29,5 +29,5 @@ func TestIssues(t *testing.T) {
assert.EqualValues(t, map[int64]int64{1: 1}, ctx.Data["Counts"])
assert.EqualValues(t, true, ctx.Data["IsShowClosed"])
assert.Len(t, ctx.Data["Issues"], 1)
assert.Len(t, ctx.Data["Repos"], 2)
assert.Len(t, ctx.Data["Repos"], 1)
}