Browse Source

fix: support qrcode and barcode group by

pull/6987/head
Pranav C 1 year ago
parent
commit
e1a6e8d3f4
  1. 8
      packages/nocodb/src/db/conditionV2.ts

8
packages/nocodb/src/db/conditionV2.ts

@ -14,7 +14,7 @@ import genRollupSelectv2 from '~/db/genRollupSelectv2';
import { sanitize } from '~/helpers/sqlSanitize'; import { sanitize } from '~/helpers/sqlSanitize';
import Filter from '~/models/Filter'; import Filter from '~/models/Filter';
import generateLookupSelectQuery from '~/db/generateLookupSelectQuery'; import generateLookupSelectQuery from '~/db/generateLookupSelectQuery';
import { Model } from '~/models'; import {BarcodeColumn, Model, QrCodeColumn} from '~/models';
import { getAliasGenerator } from '~/utils'; import { getAliasGenerator } from '~/utils';
// tod: tobe fixed // tod: tobe fixed
@ -135,7 +135,11 @@ const parseConditionV2 = async (
}; };
} else { } else {
filter.comparison_op = 'eq'; filter.comparison_op = 'eq';
} // if qrCode or Barcode replace it with value column
if ([UITypes.QrCode, UITypes.Barcode].includes(column.uidt))
filter.fk_column_id = await column
.getColOptions<BarcodeColumn | QrCodeColumn>()
.then((col) => col.fk_column_id)
} }
const column = await filter.getColumn(); const column = await filter.getColumn();

Loading…
Cancel
Save