Browse Source

fix: ignore filter and sort on duplicate

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/6953/head
mertmit 1 year ago
parent
commit
146b793220
  1. 2
      packages/nocodb/src/db/BaseModelSqlv2.ts
  2. 2
      packages/nocodb/src/modules/jobs/jobs/export-import/export.service.ts
  3. 5
      packages/nocodb/src/services/datas.service.ts

2
packages/nocodb/src/db/BaseModelSqlv2.ts

@ -359,7 +359,7 @@ class BaseModelSqlv2 {
qb.orderBy('created_at');
}
if (!ignoreViewFilterAndSort) applyPaginate(qb, rest);
applyPaginate(qb, rest);
const proto = await this.getProto();
let data;

2
packages/nocodb/src/modules/jobs/jobs/export-import/export.service.ts

@ -577,6 +577,7 @@ export class ExportService {
view,
query: { limit, offset, fields },
baseModel,
ignoreViewFilterAndSort: true,
})
.then((result) => {
try {
@ -625,6 +626,7 @@ export class ExportService {
view,
query: { limit, offset, fields },
baseModel,
ignoreViewFilterAndSort: true,
})
.then((result) => {
try {

5
packages/nocodb/src/services/datas.service.ts

@ -134,8 +134,9 @@ export class DatasService {
query: any;
baseModel?: BaseModelSqlv2;
throwErrorIfInvalidParams?: boolean;
ignoreViewFilterAndSort?: boolean;
}) {
const { model, view, query = {} } = param;
const { model, view, query = {}, ignoreViewFilterAndSort = false } = param;
const source = await Source.get(model.source_id);
@ -171,7 +172,7 @@ export class DatasService {
ast,
await baseModel.list(
listArgs,
false,
ignoreViewFilterAndSort,
false,
param.throwErrorIfInvalidParams,
),

Loading…
Cancel
Save