Browse Source

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

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

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

@ -24,10 +24,12 @@ export default class ModelRoleVisibility implements ModelRoleVisibilityType {
}
static async list(projectId): Promise<ModelRoleVisibility[]> {
let data = await NocoCache.getList(CacheScope.MODEL_ROLE_VISIBILITY, [
const cachedList = await NocoCache.getList(CacheScope.MODEL_ROLE_VISIBILITY, [
projectId,
]);
if (!data.length) {
let { list: data } = cachedList;
const { isEmptyList } = cachedList;
if (!isEmptyList && !data.length) {
data = await Noco.ncMeta.metaList2(
projectId,
null,

Loading…
Cancel
Save