@nkhang1902/strapi-plugin-export-import-clsx 1.2.2 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nkhang1902/strapi-plugin-export-import-clsx",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "A powerful Strapi plugin for exporting and importing data with Excel support and advanced filtering",
5
5
  "main": "./strapi-server.js",
6
6
  "scripts": {
@@ -228,6 +228,7 @@ module.exports = ({ strapi }) => ({
228
228
  "updatedBy",
229
229
  "localizations",
230
230
  "status",
231
+ "event",
231
232
  ];
232
233
  const SHORTCUT_FIELDS = [
233
234
  "email",
@@ -156,7 +156,8 @@ module.exports = ({ strapi }) => ({
156
156
  filters: { [field]: { $eq: value } },
157
157
  });
158
158
  if (existing) return { id: existing.id };
159
- throw new Error(`Not found.`);
159
+ // throw new Error(`Not found.`);
160
+ return null;
160
161
  }
161
162
  return null;
162
163
  };
@@ -412,10 +413,10 @@ module.exports = ({ strapi }) => ({
412
413
 
413
414
  if (id) {
414
415
  existing = await strapi.documents(contentType).findFirst(
415
- { filters: { id }, populate: "*" },
416
+ { filters: { id, event: { documentId: eventId } }, populate: "*" },
416
417
  { transaction: trx }
417
418
  );
418
- if (!existing) throw new Error(`Document with id ${id} not found`);
419
+ // if (!existing) throw new Error(`Document with id ${id} not found`);
419
420
  }
420
421
 
421
422
  if (event && !data.event) data.event = event.name;