Browse Source

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

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

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

@ -97,10 +97,12 @@ export default class GalleryViewColumn {
viewId: string, viewId: string,
ncMeta = Noco.ncMeta ncMeta = Noco.ncMeta
): Promise<GalleryViewColumn[]> { ): Promise<GalleryViewColumn[]> {
let views = await NocoCache.getList(CacheScope.GALLERY_VIEW_COLUMN, [ const cachedList = await NocoCache.getList(CacheScope.GALLERY_VIEW_COLUMN, [
viewId, viewId,
]); ]);
if (!views.length) { let { list: views } = cachedList;
const { isEmptyList } = cachedList;
if (!isEmptyList && !views.length) {
views = await ncMeta.metaList2( views = await ncMeta.metaList2(
null, null,
null, null,

Loading…
Cancel
Save