|
|
@ -657,10 +657,13 @@ class BaseModelSqlv2 { |
|
|
|
qb, |
|
|
|
qb, |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
if (!sorts) |
|
|
|
if (!sorts) { |
|
|
|
sorts = args.sortArr?.length |
|
|
|
if (args.sortArr?.length) { |
|
|
|
? args.sortArr |
|
|
|
sorts = args.sortArr; |
|
|
|
: await Sort.list({ viewId: this.viewId }); |
|
|
|
} else if (this.viewId) { |
|
|
|
|
|
|
|
sorts = await Sort.list({ viewId: this.viewId }); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// if sort is provided filter out the group by columns sort and apply
|
|
|
|
// if sort is provided filter out the group by columns sort and apply
|
|
|
|
// since we are grouping by the column and applying sort on any other column is not required
|
|
|
|
// since we are grouping by the column and applying sort on any other column is not required
|
|
|
|