From fd7d83ace60258acf7139c4c787aa8af75b7ba8c Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 20 May 2022 22:08:52 +0800 Subject: Move almost all functions' parameter db.Engine to context.Context (#19748) * Move almost all functions' parameter db.Engine to context.Context * remove some unnecessary wrap functions --- services/context/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'services/context') diff --git a/services/context/user.go b/services/context/user.go index c5efd43782..1c92d24d4a 100644 --- a/services/context/user.go +++ b/services/context/user.go @@ -44,7 +44,7 @@ func userAssignment(ctx *context.Context, errCb func(int, string, interface{})) ctx.ContextUser = ctx.Doer } else { var err error - ctx.ContextUser, err = user_model.GetUserByName(username) + ctx.ContextUser, err = user_model.GetUserByName(ctx, username) if err != nil { if user_model.IsErrUserNotExist(err) { if redirectUserID, err := user_model.LookupUserRedirect(username); err == nil { -- cgit v1.2.3