We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce8eb20 commit 7d93dd2Copy full SHA for 7d93dd2
models/user/user.go
@@ -1028,7 +1028,7 @@ func GetUserNamesByIDs(ids []int64) ([]string, error) {
1028
// GetUserNameByID returns username for the id
1029
func GetUserNameByID(ctx context.Context, id int64) (string, error) {
1030
var name string
1031
- has, err := db.GetEngine(db.DefaultContext).Table("user").Where("id = ?", id).Cols("name").Get(&name)
+ has, err := db.GetEngine(ctx).Table("user").Where("id = ?", id).Cols("name").Get(&name)
1032
if err != nil {
1033
return "", err
1034
}
0 commit comments