diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2023-01-18 05:03:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-17 15:03:44 -0600 |
commit | db2286bbb69f5453f5b184a16a9dca999f3f3eb8 (patch) | |
tree | 3d425b4e184233b8f776762a0b46e49a12ec1532 /models/issues/review.go | |
parent | 60c4725cc2e908bedcbece00cd1efa0be9b7d540 (diff) | |
download | gitea-db2286bbb69f5453f5b184a16a9dca999f3f3eb8.tar.gz gitea-db2286bbb69f5453f5b184a16a9dca999f3f3eb8.zip |
some refactor about code comments (#20821)
Diffstat (limited to 'models/issues/review.go')
-rw-r--r-- | models/issues/review.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/models/issues/review.go b/models/issues/review.go index d8e517ad3c..7e1a39bb5b 100644 --- a/models/issues/review.go +++ b/models/issues/review.go @@ -972,7 +972,7 @@ func DeleteReview(r *Review) error { ReviewID: r.ID, } - if _, err := sess.Where(opts.toConds()).Delete(new(Comment)); err != nil { + if _, err := sess.Where(opts.ToConds()).Delete(new(Comment)); err != nil { return err } @@ -982,7 +982,7 @@ func DeleteReview(r *Review) error { ReviewID: r.ID, } - if _, err := sess.Where(opts.toConds()).Delete(new(Comment)); err != nil { + if _, err := sess.Where(opts.ToConds()).Delete(new(Comment)); err != nil { return err } @@ -1006,7 +1006,7 @@ func (r *Review) GetCodeCommentsCount() int { IssueID: r.IssueID, ReviewID: r.ID, } - conds := opts.toConds() + conds := opts.ToConds() if r.ID == 0 { conds = conds.And(builder.Eq{"invalidated": false}) } @@ -1026,7 +1026,7 @@ func (r *Review) HTMLURL() string { ReviewID: r.ID, } comment := new(Comment) - has, err := db.GetEngine(db.DefaultContext).Where(opts.toConds()).Get(comment) + has, err := db.GetEngine(db.DefaultContext).Where(opts.ToConds()).Get(comment) if err != nil || !has { return "" } |