Browse Source

qrcode: add missing logic to columnApis#columnAdd

pull/4142/head
Daniel Spaude 2 years ago
parent
commit
160eb1fd62
No known key found for this signature in database
GPG Key ID: 654A3D1FA4F35FFE
  1. 1
      packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts
  2. 6
      packages/nocodb/src/lib/meta/api/columnApis.ts

1
packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts

@ -1436,7 +1436,6 @@ class BaseModelSqlv2 {
break; break;
} }
} }
console.debug('qb.toQuery(): ', qb.toQuery());
qb.select(res); qb.select(res);
} }

6
packages/nocodb/src/lib/meta/api/columnApis.ts

@ -490,6 +490,12 @@ export async function columnAdd(req: Request, res: Response<TableType>) {
Tele.emit('evt', { evt_type: 'relation:created' }); Tele.emit('evt', { evt_type: 'relation:created' });
break; break;
case UITypes.QrCode:
await Column.insert({
...colBody,
fk_model_id: table.id,
});
break;
case UITypes.Formula: case UITypes.Formula:
colBody.formula = await substituteColumnAliasWithIdInFormula( colBody.formula = await substituteColumnAliasWithIdInFormula(
colBody.formula_raw || colBody.formula, colBody.formula_raw || colBody.formula,

Loading…
Cancel
Save