Browse Source

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

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

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

@ -79,8 +79,10 @@ export default class Project implements ProjectType {
ncMeta = Noco.ncMeta
): Promise<Project[]> {
// todo: pagination
let projectList = await NocoCache.getList(CacheScope.PROJECT, []);
if (!projectList.length) {
const cachedList = await NocoCache.getList(CacheScope.PROJECT, []);
let { list: projectList } = cachedList;
const { isEmptyList } = cachedList;
if (!isEmptyList && !projectList.length) {
projectList = await ncMeta.metaList2(null, null, MetaTable.PROJECT, {
xcCondition: {
_or: [

Loading…
Cancel
Save