mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-26 19:34:06 +00:00
fix(db): make paginated database reads always require "order" option (#39017)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -208,9 +208,5 @@ func (opts FindExternalUserOptions) ToConds() builder.Cond {
|
||||
}
|
||||
|
||||
func (opts FindExternalUserOptions) ToOrders() string {
|
||||
return opts.OrderBy
|
||||
}
|
||||
|
||||
func IterateExternalLogin(ctx context.Context, opts FindExternalUserOptions, f func(ctx context.Context, u *ExternalLoginUser) error) error {
|
||||
return db.Iterate(ctx, opts.ToConds(), f)
|
||||
return util.IfZero(opts.OrderBy, "external_id")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user