mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-04 14:46:57 -05:00
Don't select join table's columns (#19660)
* Don't select join table * Add comment
This commit is contained in:
parent
cd99540cdc
commit
e435283c0f
@ -340,7 +340,9 @@ func GetFeeds(ctx context.Context, opts GetFeedsOptions) (ActionList, error) {
|
||||
}
|
||||
|
||||
e := db.GetEngine(ctx)
|
||||
sess := e.Where(cond).Join("INNER", "repository", "`repository`.id = `action`.repo_id")
|
||||
sess := e.Where(cond).
|
||||
Select("`action`.*"). // this line will avoid select other joined table's columns
|
||||
Join("INNER", "repository", "`repository`.id = `action`.repo_id")
|
||||
|
||||
opts.SetDefaultValues()
|
||||
sess = db.SetSessionPagination(sess, &opts)
|
||||
|
Loading…
Reference in New Issue
Block a user