Browse Source

fix(api): avoid adding null group by default if options param passed

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3563/head
Pranav C 2 years ago
parent
commit
5a3cb17252
  1. 3
      packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts

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

@ -2361,6 +2361,7 @@ class BaseModelSqlv2 {
SelectOption[] & { options }
>();
groupingValues = new Set(colOptions.options.map((opt) => opt.title));
groupingValues.add(null);
} else {
groupingValues = new Set(
(
@ -2369,8 +2370,8 @@ class BaseModelSqlv2 {
.distinct()
).map((row) => row[column.column_name])
);
}
groupingValues.add(null);
}
const qb = this.dbDriver(this.model.table_name);
qb.limit(+rest?.limit || 25);

Loading…
Cancel
Save