@nkhang1902/strapi-plugin-export-import-clsx 1.8.2 → 1.8.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.8.2",
3
+ "version": "1.8.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": {
@@ -353,13 +353,13 @@ module.exports = ({ strapi }) => ({
353
353
 
354
354
  if (relationFields.includes("event")) {
355
355
  console.log(entries[0].event)
356
- event = await strapi.documents("event").findFirst({
356
+ event = await strapi.documents("api::event.event").findFirst({
357
357
  filters: {
358
358
  id: {
359
359
  $eq: entries[0].event.id,
360
360
  },
361
361
  },
362
- populate: true
362
+ populate: "*",
363
363
  })
364
364
  console.log(event)
365
365
  }
@@ -431,10 +431,12 @@ module.exports = ({ strapi }) => ({
431
431
  });
432
432
  results.updated++;
433
433
  } else {
434
+ if (strapi.contentTypes[contentType].attributes?.event) {
435
+ data.event = { documentId: eventId };
436
+ }
434
437
  await strapi.documents(contentType).create({
435
438
  data: {
436
439
  ...data,
437
- event: { documentId: eventId },
438
440
  },
439
441
  transaction: trx,
440
442
  });