fix bug:Studios sort by scene_count reported by malcuk on discord

This commit is contained in:
bill 2019-05-31 01:59:29 +03:00
parent 034e5d60ac
commit 92d90863a8
1 changed files with 3 additions and 0 deletions

View File

@ -85,6 +85,9 @@ func (qb *StudioQueryBuilder) Query(findFilter *FindFilterType) ([]*Studio, int)
var havingClauses []string
var args []interface{}
body := selectDistinctIDs("studios")
body += `
join scenes on studios.id = scenes.studio_id
`
if q := findFilter.Q; q != nil && *q != "" {
searchColumns := []string{"studios.name"}