Browse Source

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

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

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

@ -69,10 +69,12 @@ export default class SelectOption implements SelectOptionType {
}
public static async read(fk_column_id: string, ncMeta = Noco.ncMeta) {
let options = await NocoCache.getList(CacheScope.COL_SELECT_OPTION, [
const cachedList = await NocoCache.getList(CacheScope.COL_SELECT_OPTION, [
fk_column_id,
]);
if (!options.length) {
let { list: options } = cachedList;
const { isEmptyList } = cachedList;
if (!isEmptyList && !options.length) {
options = await ncMeta.metaList2(
null, //,
null, //model.db_alias,

Loading…
Cancel
Save