Skip to content

Commit

Permalink
one more parameter rename
Browse files Browse the repository at this point in the history
  • Loading branch information
metiftikci committed May 24, 2024
1 parent 36f8059 commit c42ad73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions models/issues/issue_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func UpdateIssueAttachments(ctx context.Context, issueID int64, uuids []string)
}

// ChangeIssueContent changes issue content, as the given user.
func ChangeIssueContent(ctx context.Context, issue *Issue, doer *user_model.User, content string, version int) (err error) {
func ChangeIssueContent(ctx context.Context, issue *Issue, doer *user_model.User, content string, contentVersion int) (err error) {
ctx, committer, err := db.TxContext(ctx)
if err != nil {
return err
Expand All @@ -254,9 +254,9 @@ func ChangeIssueContent(ctx context.Context, issue *Issue, doer *user_model.User
}

issue.Content = content
issue.ContentVersion = version + 1
issue.ContentVersion = contentVersion + 1

affected, err := db.GetEngine(ctx).ID(issue.ID).Cols("content", "content_version").Where("content_version = ?", version).Update(issue)
affected, err := db.GetEngine(ctx).ID(issue.ID).Cols("content", "content_version").Where("content_version = ?", contentVersion).Update(issue)
if err != nil {
return err
}
Expand Down

0 comments on commit c42ad73

Please sign in to comment.