mirror of
https://github.com/beetbox/beets.git
synced 2025-12-30 20:42:37 +01:00
Fix sorting without using the MultipleSort object.
SQL syntax error when using a simple FlexFieldSort.
This commit is contained in:
parent
a90991b296
commit
1a995ed8d4
1 changed files with 4 additions and 2 deletions
|
|
@ -569,7 +569,7 @@ class MultipleSort(Sort):
|
|||
select_strings.append(select)
|
||||
|
||||
select_string = ",".join(select_strings)
|
||||
return "" if not select_string else ", " + select_string
|
||||
return select_string
|
||||
|
||||
def union_clause(self):
|
||||
sql_sorts = self._sql_sorts()
|
||||
|
|
@ -730,7 +730,9 @@ def build_sql(model_cls, query, sort):
|
|||
if sort else ""
|
||||
slow_sort = False
|
||||
elif isinstance(sort, Sort):
|
||||
sort_select = sort.select_clause()
|
||||
select_clause = sort.select_clause()
|
||||
sort_select = " ,{0} ".format(select_clause) \
|
||||
if select_clause else ""
|
||||
sort_union = sort.union_clause()
|
||||
slow_sort = sort.is_slow()
|
||||
order_clause = sort.order_clause()
|
||||
|
|
|
|||
Loading…
Reference in a new issue