Browse Source

fix(api): App upgrade - ignore virtual views

Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com>
pull/341/head
Pranav C 4 years ago
parent
commit
e80e0a490e
  1. 2
      packages/nocodb/src/lib/noco/Noco.ts
  2. 5
      packages/nocodb/src/lib/noco/common/BaseApiBuilder.ts
  3. 3
      packages/nocodb/src/lib/noco/gql/GqlApiBuilder.ts

2
packages/nocodb/src/lib/noco/Noco.ts

@ -88,6 +88,8 @@ export default class Noco {
constructor() {
process.env.PORT = process.env.PORT || '8080';
// todo: move
process.env.NC_VERSION = '0009044';
this.router = express.Router();
this.projectRouter = express.Router();

5
packages/nocodb/src/lib/noco/common/BaseApiBuilder.ts

@ -1325,7 +1325,10 @@ export default abstract class BaseApiBuilder<T extends Noco> implements XcDynami
protected async ncUpManyToMany(): Promise<any> {
const models = await this.xcMeta.metaList(this.projectId, this.dbAlias, 'nc_models', {
fields: ['meta']
fields: ['meta'],
condition: {
type: 'table'
}
});
if (!models.length) {
return

3
packages/nocodb/src/lib/noco/gql/GqlApiBuilder.ts

@ -1911,7 +1911,8 @@ export class GqlApiBuilder extends BaseApiBuilder<Noco> implements XcMetaMgr {
await this.xcMeta.metaUpdate(this.projectId, this.dbAlias, 'nc_models', {
schema
}, {
title: meta.tn
title: meta.tn,
type: 'table'
})
// todo : add loaders

Loading…
Cancel
Save