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 ncMeta = Noco.ncMeta
): Promise<Project[]> { ): Promise<Project[]> {
// todo: pagination // todo: pagination
let projectList = await NocoCache.getList(CacheScope.PROJECT, []); const cachedList = await NocoCache.getList(CacheScope.PROJECT, []);
if (!projectList.length) { let { list: projectList } = cachedList;
const { isEmptyList } = cachedList;
if (!isEmptyList && !projectList.length) {
projectList = await ncMeta.metaList2(null, null, MetaTable.PROJECT, { projectList = await ncMeta.metaList2(null, null, MetaTable.PROJECT, {
xcCondition: { xcCondition: {
_or: [ _or: [

Loading…
Cancel
Save