mirror of
https://github.com/go-gitea/gitea
synced 2024-06-01 19:06:52 +02:00
remove unnecessary wrap
This commit is contained in:
parent
cf9ef10510
commit
f7f36ddbaa
|
@ -90,16 +90,10 @@ func LoadIssuesFromBoardList(ctx context.Context, bs project_model.BoardList) (m
|
|||
return issuesMap, nil
|
||||
}
|
||||
|
||||
// IssueAssignOrRemoveProject changes the project associated with an issue, if newProjectID is 0, the issue is removed from the project
|
||||
// IssueAssignOrRemoveProject changes the project associated with an issue
|
||||
// If newProjectID is 0, the issue is removed from the project
|
||||
func IssueAssignOrRemoveProject(ctx context.Context, issue *Issue, doer *user_model.User, newProjectID, newColumnID int64) error {
|
||||
return db.WithTx(ctx, func(ctx context.Context) error {
|
||||
return issueAssignOrRemoveProject(ctx, issue, doer, newProjectID, newColumnID)
|
||||
})
|
||||
}
|
||||
|
||||
// issueAssignOrRemoveProject adds or updates the project the default column associated with an issue
|
||||
// If newProjectID is 0, the issue is removed from the project
|
||||
func issueAssignOrRemoveProject(ctx context.Context, issue *Issue, doer *user_model.User, newProjectID, newColumnID int64) error {
|
||||
oldProjectID := issue.projectID(ctx)
|
||||
|
||||
if err := issue.LoadRepo(ctx); err != nil {
|
||||
|
@ -154,4 +148,5 @@ func issueAssignOrRemoveProject(ctx context.Context, issue *Issue, doer *user_mo
|
|||
ProjectBoardID: newColumnID,
|
||||
Sorting: maxSorting,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user