소스 검색

Fix wrong xorm Delete usage(backport for 1.21) (#28002)

manually backport for https://github.com/go-gitea/gitea/pull/27995
The conflict is `ctx` and `db.Defaultctx`.
tags/v1.21.0
Nanguan Lin 7 달 전
부모
커밋
97f4239a94
No account linked to committer's email address
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      models/auth/source.go

+ 1
- 1
models/auth/source.go 파일 보기

@@ -232,7 +232,7 @@ func CreateSource(source *Source) error {
err = registerableSource.RegisterSource()
if err != nil {
// remove the AuthSource in case of errors while registering configuration
if _, err := db.GetEngine(db.DefaultContext).Delete(source); err != nil {
if _, err := db.GetEngine(db.DefaultContext).ID(source.ID).Delete(new(Source)); err != nil {
log.Error("CreateSource: Error while wrapOpenIDConnectInitializeError: %v", err)
}
}

Loading…
취소
저장