diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2022-03-29 22:16:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-29 22:16:31 +0800 |
commit | bd97736b9c7a16023bc9abf17be6157284f655b1 (patch) | |
tree | eea5870d406bd00fa2e675901f24d9f1fbf1796f /models/issue_comment.go | |
parent | ea6efba9b3fd298c842a935266060e405e2ae4a3 (diff) | |
download | gitea-bd97736b9c7a16023bc9abf17be6157284f655b1.tar.gz gitea-bd97736b9c7a16023bc9abf17be6157284f655b1.zip |
Move project files into models/project sub package (#17704)
* Move project files into models/project sub package
* Fix test
* Fix test
* Fix test
* Fix build
* Fix test
* Fix template bug
* Fix bug
* Fix lint
* Fix test
* Fix import
* Improve codes
Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'models/issue_comment.go')
-rw-r--r-- | models/issue_comment.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/models/issue_comment.go b/models/issue_comment.go index 7927b0037b..500ed6d038 100644 --- a/models/issue_comment.go +++ b/models/issue_comment.go @@ -17,6 +17,7 @@ import ( "code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/issues" "code.gitea.io/gitea/models/organization" + project_model "code.gitea.io/gitea/models/project" repo_model "code.gitea.io/gitea/models/repo" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/git" @@ -204,8 +205,8 @@ type Comment struct { RemovedLabels []*Label `xorm:"-"` OldProjectID int64 ProjectID int64 - OldProject *Project `xorm:"-"` - Project *Project `xorm:"-"` + OldProject *project_model.Project `xorm:"-"` + Project *project_model.Project `xorm:"-"` OldMilestoneID int64 MilestoneID int64 OldMilestone *Milestone `xorm:"-"` @@ -469,7 +470,7 @@ func (c *Comment) LoadLabel() error { // LoadProject if comment.Type is CommentTypeProject, then load project. func (c *Comment) LoadProject() error { if c.OldProjectID > 0 { - var oldProject Project + var oldProject project_model.Project has, err := db.GetEngine(db.DefaultContext).ID(c.OldProjectID).Get(&oldProject) if err != nil { return err @@ -479,7 +480,7 @@ func (c *Comment) LoadProject() error { } if c.ProjectID > 0 { - var project Project + var project project_model.Project has, err := db.GetEngine(db.DefaultContext).ID(c.ProjectID).Get(&project) if err != nil { return err |