mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-07 09:57:07 +02:00
Fix unnecessary comment when moving issue on the same project column (#33496)
Fix #33482
This commit is contained in:
1 parent
a6819570be
commit
6999651b6d
3 files changed
+31
-17
No files matched your search
@@ -38,13 +38,15 @@ func (issue *Issue) projectID(ctx context.Context) int64 {
|
||||
}
|
||||
|
||||
// ProjectColumnID return project column id if issue was assigned to one
|
||||
func (issue *Issue) ProjectColumnID(ctx context.Context) int64 {
|
||||
func (issue *Issue) ProjectColumnID(ctx context.Context) (int64, error) {
|
||||
var ip project_model.ProjectIssue
|
||||
has, err := db.GetEngine(ctx).Where("issue_id=?", issue.ID).Get(&ip)
|
||||
if err != nil || !has {
|
||||
return 0
|
||||
if err != nil {
|
||||
return 0, err
|
||||
} else if !has {
|
||||
return 0, nil
|
||||
}
|
||||
return ip.ProjectColumnID
|
||||
return ip.ProjectColumnID, nil
|
||||
}
|
||||
|
||||
// LoadIssuesFromColumn load issues assigned to this column
|
||||
|
||||
Reference in new issue
Block a user