Fix overriding viewv2 schemas
This commit is contained in:
parent
4db33b9d75
commit
dcf26dd0cb
1 changed files with 7 additions and 1 deletions
|
@ -97,7 +97,13 @@ export async function save(ctx: any) {
|
||||||
// update schema of non-statistics views when new columns are added
|
// update schema of non-statistics views when new columns are added
|
||||||
for (let view in tableToSave.views) {
|
for (let view in tableToSave.views) {
|
||||||
const tableView = tableToSave.views[view]
|
const tableView = tableToSave.views[view]
|
||||||
if (!tableView || sdk.views.isV2(tableView)) continue
|
if (!tableView) continue
|
||||||
|
|
||||||
|
if (sdk.views.isV2(tableView)) {
|
||||||
|
// We don't want to modify views from the tables controller
|
||||||
|
tableToSave.views[view] = oldTable!.views![view]
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(tableView.schema as ViewStatisticsSchema).group ||
|
(tableView.schema as ViewStatisticsSchema).group ||
|
||||||
|
|
Loading…
Reference in a new issue