@strapi/core 5.11.1 → 5.11.2

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/dist/index.js CHANGED
@@ -312,7 +312,7 @@ const getDirs = ({ appDir, distDir }, config)=>({
312
312
  });
313
313
 
314
314
  var name = "@strapi/core";
315
- var version = "5.11.1";
315
+ var version = "5.11.2";
316
316
  var description = "Core of Strapi";
317
317
  var homepage = "https://strapi.io";
318
318
  var bugs = {
@@ -368,14 +368,14 @@ var dependencies = {
368
368
  "@koa/cors": "5.0.0",
369
369
  "@koa/router": "12.0.2",
370
370
  "@paralleldrive/cuid2": "2.2.2",
371
- "@strapi/admin": "5.11.1",
372
- "@strapi/database": "5.11.1",
373
- "@strapi/generators": "5.11.1",
374
- "@strapi/logger": "5.11.1",
375
- "@strapi/permissions": "5.11.1",
376
- "@strapi/types": "5.11.1",
377
- "@strapi/typescript-utils": "5.11.1",
378
- "@strapi/utils": "5.11.1",
371
+ "@strapi/admin": "5.11.2",
372
+ "@strapi/database": "5.11.2",
373
+ "@strapi/generators": "5.11.2",
374
+ "@strapi/logger": "5.11.2",
375
+ "@strapi/permissions": "5.11.2",
376
+ "@strapi/types": "5.11.2",
377
+ "@strapi/typescript-utils": "5.11.2",
378
+ "@strapi/utils": "5.11.2",
379
379
  bcryptjs: "2.4.3",
380
380
  boxen: "5.1.2",
381
381
  chalk: "4.1.2",
@@ -438,9 +438,9 @@ var devDependencies = {
438
438
  "@types/node": "18.19.24",
439
439
  "@types/node-schedule": "2.1.7",
440
440
  "@types/statuses": "2.0.1",
441
- "eslint-config-custom": "5.11.1",
441
+ "eslint-config-custom": "5.11.2",
442
442
  supertest: "6.3.3",
443
- tsconfig: "5.11.1"
443
+ tsconfig: "5.11.2"
444
444
  };
445
445
  var engines = {
446
446
  node: ">=18.0.0 <=22.x.x",
@@ -6934,6 +6934,11 @@ const EVENTS = {
6934
6934
  if (attribute.type !== 'relation' || attribute.target !== uid || !(attribute.inversedBy || attribute.mappedBy)) {
6935
6935
  continue;
6936
6936
  }
6937
+ // If it's a self referencing relation, there is no need to sync any relation
6938
+ // The order will already be handled as both sides are inside the same content type
6939
+ if (model.uid === uid) {
6940
+ continue;
6941
+ }
6937
6942
  const joinTable = attribute.joinTable;
6938
6943
  if (!joinTable) {
6939
6944
  continue;
@@ -6993,6 +6998,10 @@ const EVENTS = {
6993
6998
  const sourceColumn = joinTable.inverseJoinColumn.name;
6994
6999
  const targetColumn = joinTable.joinColumn.name;
6995
7000
  const orderColumn = joinTable.orderColumnName;
7001
+ // Failsafe in case those don't exist
7002
+ if (!sourceColumn || !targetColumn || !orderColumn) {
7003
+ continue;
7004
+ }
6996
7005
  // Update order values for each relation
6997
7006
  // TODO: Find a way to batch it more efficiently
6998
7007
  await strapiUtils.async.map(relations, (relation)=>{