Browse Source

qrcode: skip QR column if referenced column doesn't exist anymore

pull/4142/head
Daniel Spaude 2 years ago
parent
commit
fc97e1ff3a
No known key found for this signature in database
GPG Key ID: 654A3D1FA4F35FFE
  1. 2
      packages/nc-gui/components/virtual-cell/QrCode.vue
  2. 7
      packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts

2
packages/nc-gui/components/virtual-cell/QrCode.vue

@ -20,7 +20,7 @@ const handleOk = (e: MouseEvent) => {
</script>
<template>
<a-modal v-model:visible="visible" :title="qrValue" @ok="handleOk" footer>
<a-modal v-model:visible="visible" :title="qrValue" footer @ok="handleOk" :bodyStyle="{ padding: '0px' }">
<img v-if="qrValue" :src="qrCodeLarge" alt="QR Code" class="qr-code" />
</a-modal>
<img v-if="qrValue" :src="qrCode" alt="QR Code" class="qr-code" @click="showQrModal" />

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

@ -1368,7 +1368,12 @@ class BaseModelSqlv2 {
});
console.log('qrCodeColumn', qrCodeColumn);
console.log('qrValueColumn', qrValueColumn);
// qb.select({ [column.column_name]: qrValueColumn.column_name });
// If the referenced
if (qrValueColumn == null) {
// res[sanitize(column.title || column.column_name)] = null;
break;
}
switch (qrValueColumn.uidt) {
case UITypes.Formula:

Loading…
Cancel
Save