Browse Source

chore(gui-v2): type correction

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/2860/head
Pranav C 2 years ago
parent
commit
f1190cc08c
  1. 2
      packages/nocodb/src/lib/models/View.ts
  2. 4
      packages/nocodb/src/lib/version-upgrader/ncProjectUpgraderV2_0090000.ts

2
packages/nocodb/src/lib/models/View.ts

@ -30,7 +30,7 @@ export default class View implements ViewType {
is_default: boolean; is_default: boolean;
order: number; order: number;
type: ViewTypes; type: ViewTypes;
lock_type?: string; lock_type?: ViewType['lock_type'];
fk_model_id: string; fk_model_id: string;
model?: Model; model?: Model;

4
packages/nocodb/src/lib/version-upgrader/ncProjectUpgraderV2_0090000.ts

@ -8,6 +8,7 @@ import {
ModelTypes, ModelTypes,
substituteColumnAliasWithIdInFormula, substituteColumnAliasWithIdInFormula,
UITypes, UITypes,
ViewType,
ViewTypes, ViewTypes,
} from 'nocodb-sdk'; } from 'nocodb-sdk';
import Column from '../models/Column'; import Column from '../models/Column';
@ -1029,7 +1030,8 @@ async function migrateViewsParams(
}, },
ncMeta ncMeta
); );
view.lock_type = queryParams?.viewStatus?.type; view.lock_type = queryParams?.viewStatus
?.type as ViewType['lock_type'];
} }
// migrate view sort list // migrate view sort list
for (const sort of queryParams.sortList || []) { for (const sort of queryParams.sortList || []) {

Loading…
Cancel
Save