From e6116cf7ef47b35ff49594da8cc3e9b2c5a4e3db Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 2 Mar 2023 19:02:18 +0530 Subject: [PATCH] fix: replace model with view Signed-off-by: Pranav C --- packages/nocodb/src/lib/services/modelVisibilityService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nocodb/src/lib/services/modelVisibilityService.ts b/packages/nocodb/src/lib/services/modelVisibilityService.ts index 95471c0ead..eb2f21ec7e 100644 --- a/packages/nocodb/src/lib/services/modelVisibilityService.ts +++ b/packages/nocodb/src/lib/services/modelVisibilityService.ts @@ -1,8 +1,8 @@ import { VisibilityRuleReqType } from 'nocodb-sdk'; import { NcError } from '../meta/helpers/catchError'; -import Model from '../models/Model'; import ModelRoleVisibility from '../models/ModelRoleVisibility'; import { T } from 'nc-help'; +import { Model, View } from '../models'; export async function xcVisibilityMetaSetAll(param: { visibilityRule: VisibilityRuleReqType; @@ -11,7 +11,7 @@ export async function xcVisibilityMetaSetAll(param: { T.emit('evt', { evt_type: 'uiAcl:updated' }); for (const d of param.visibilityRule) { for (const role of Object.keys(d.disabled)) { - const view = await Model.get(d.id); + const view = await View.get(d.id); if (view.project_id !== param.projectId) { NcError.badRequest('View does not belong to the project');