load repo before actually using it

This commit is contained in:
David Schneiderbauer 2018-06-05 09:21:26 +02:00
parent 7b990f788b
commit 4ea560ccad
No known key found for this signature in database
GPG Key ID: 576113B2803B3EAB

View File

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