diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-11-10 03:57:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-09 20:57:58 +0100 |
commit | 99b2858e628d92bba252be72def409af77af735b (patch) | |
tree | 56159cf10b271307911e6f01626c0c3efba789ab /models/notification.go | |
parent | b6b1e716654fec3b16d245ef65cf42e57e1bb5b6 (diff) | |
download | gitea-99b2858e628d92bba252be72def409af77af735b.tar.gz gitea-99b2858e628d92bba252be72def409af77af735b.zip |
Move unit into models/unit/ (#17576)
* Move unit into models/unit/
* Rename unit.UnitType as unit.Type
Diffstat (limited to 'models/notification.go')
-rw-r--r-- | models/notification.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/models/notification.go b/models/notification.go index bcbe8b0988..ce656f4355 100644 --- a/models/notification.go +++ b/models/notification.go @@ -9,6 +9,7 @@ import ( "strconv" "code.gitea.io/gitea/models/db" + "code.gitea.io/gitea/models/unit" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" @@ -262,10 +263,10 @@ func createOrUpdateIssueNotifications(e db.Engine, issueID, commentID, notificat return err } - if issue.IsPull && !issue.Repo.checkUnitUser(e, user, UnitTypePullRequests) { + if issue.IsPull && !issue.Repo.checkUnitUser(e, user, unit.TypePullRequests) { continue } - if !issue.IsPull && !issue.Repo.checkUnitUser(e, user, UnitTypeIssues) { + if !issue.IsPull && !issue.Repo.checkUnitUser(e, user, unit.TypeIssues) { continue } |