nox-validation 1.3.6 → 1.3.7

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.
Files changed (2) hide show
  1. package/lib/helpers.js +10 -1
  2. package/package.json +1 -1
package/lib/helpers.js CHANGED
@@ -505,7 +505,8 @@ const generateRelationalField = (
505
505
  constants.types.OBJECT,
506
506
  [...collectionFields],
507
507
  "none",
508
- [constants.types.OBJECT_ID]
508
+ [constants.types.OBJECT_ID],
509
+ { ...collection_id_meta, is_m2a_item: true }
509
510
  ),
510
511
  ];
511
512
  return [existingField, deleteField, createField, updateField];
@@ -777,6 +778,14 @@ const buildNestedStructure = ({
777
778
  } else {
778
779
  childFields = getCachedFields(relationDetail, relational_fields);
779
780
  }
781
+ if(item.meta.interface === constants.interfaces.TRANSLATIONS){
782
+ childFields = childFields.filter(
783
+ (f) =>
784
+ f.field !== relationDetail.foreign_field &&
785
+ f.field !== relationDetail.junction_field_this &&
786
+ f.field !== relationDetail.junction_field_foreign
787
+ );
788
+ }
780
789
 
781
790
  if (childFields) {
782
791
  if (!isRoot) currentDepthMap.set(rootPath, currentDepth + 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nox-validation",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "validate dynamic schema",
5
5
  "main": "index.js",
6
6
  "scripts": {