Browse Source

refactor(nocodb): adopt getList new format in Sort.ts

pull/5430/head
Wing-Kam Wong 2 years ago
parent
commit
a335da6248
  1. 6
      packages/nocodb/src/lib/models/Sort.ts

6
packages/nocodb/src/lib/models/Sort.ts

@ -114,8 +114,10 @@ export default class Sort {
ncMeta = Noco.ncMeta
): Promise<Sort[]> {
if (!viewId) return null;
let sortList = await NocoCache.getList(CacheScope.SORT, [viewId]);
if (!sortList.length) {
const cachedList = await NocoCache.getList(CacheScope.SORT, [viewId]);
let { list: sortList } = cachedList;
const { isEmptyList } = cachedList;
if (!isEmptyList && !sortList.length) {
sortList = await ncMeta.metaList2(null, null, MetaTable.SORT, {
condition: { fk_view_id: viewId },
orderBy: {

Loading…
Cancel
Save