Baboo7 / strapi-plugin-import-export-entries

Import/Export data from and to your database in just few clicks.
175 stars 86 forks source link

[BUG] Post Edit - Duplication of ID's getting created #183

Open abhijeetpatki opened 6 months ago

abhijeetpatki commented 6 months ago

Hi,

Whenever data is imported into Strapi using the provided format, Strapi accepts the input seamlessly. However, when editing the data, Strapi generates duplicate IDs for the rental section, resulting in duplication. This issue only occurs during imports; manual additions work correctly.

Format:

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">

rateCard | sku | scmLocationId | displayName | euid | quantity | Rental | Sale -- | -- | -- | -- | -- | -- | -- | -- 17 | 5924 | 1 | 3 FUNCTION - ADJUSTABLE COT REMOTE WITH ABS BOARDS & ALUMINIUM SIDE RAILS WEIGHT CAPACITY UPTO 120 KG IMPORTED/LOCAL | AHCHYD45335 | 1 | [{"unitPrice":500,"costPrice":283,"L1":450,"L2":400,"L3":360,"rentalDeposit":13500,"days":{"id":4,"noOfDays":30,"createdAt":"2023-12-02T13:00:56.247Z","updatedAt":"2023-12-31T14:15:42.514Z","publishedAt":"2023-12-02T13:00:58.386Z"},"rental_tax_group":{"id":3,"taxGroupName":"CGST (9) + SGST (9)","taxGroupId":"18","CGST":9,"SGST":9,"IGST":null,"createdAt":"2023-08-11T14:07:37.404Z","updatedAt":"2023-12-31T14:15:42.525Z","publishedAt":"2023-08-11T14:07:38.323Z"}},{"unitPrice":600,"costPrice":400,"L1":600,"L2":533,"L3":493,"rentalDeposit":13500,"days":{"id":3,"noOfDays":15,"createdAt":"2023-12-02T13:00:48.001Z","updatedAt":"2023-12-31T14:15:42.346Z","publishedAt":"2023-12-02T13:00:50.532Z"},"rental_tax_group":{"id":3,"taxGroupName":"CGST (9) + SGST (9)","taxGroupId":"18","CGST":9,"SGST":9,"IGST":null,"createdAt":"2023-08-11T14:07:37.404Z","updatedAt":"2023-12-31T14:15:42.525Z","publishedAt":"2023-08-11T14:07:38.323Z"}}] | {"unitPrice":84000,"costPrice":66000,"L1":80000,"L2":78000,"L3":76000,"sales_tax_group":{"id":3,"taxGroupName":"CGST (9) + SGST (9)","taxGroupId":"18","CGST":9,"SGST":9,"IGST":null,"createdAt":"2023-08-11T14:07:37.404Z","updatedAt":"2023-12-31T14:15:42.525Z","publishedAt":"2023-08-11T14:07:38.323Z"}}

image