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'); qb.orderBy('created_at');
} }
if (!ignoreViewFilterAndSort) applyPaginate(qb, rest); applyPaginate(qb, rest);
const proto = await this.getProto(); const proto = await this.getProto();
let data; let data;

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

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

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

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

Loading…
Cancel
Save