rez_core 4.0.232 → 4.0.235

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": "rez_core",
3
- "version": "4.0.232",
3
+ "version": "4.0.235",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -99,12 +99,13 @@ export class EntityJSONService extends EntityServiceImpl {
99
99
  'fla.applicable_entity_type = attr.mapped_entity_type AND fla.applicable_attribute_key = attr.attribute_key',
100
100
  )
101
101
  .select([
102
- 'fla.applicable_entity_type',
103
- 'attr.id',
104
- 'attr.name',
105
- 'attr.attribute_key',
106
- 'fla.saved_filter_code',
107
- ])
102
+ 'fla.applicable_entity_type AS applicable_entity_type',
103
+ 'fla.applicable_attribute_key AS applicable_attribute_key', // SOURCE KEY (middle_name)
104
+ 'fla.attribute_key AS target_attribute_key', // TARGET KEY (father_middle_name)
105
+ 'fla.saved_filter_code AS saved_filter_code',
106
+ 'attr.name AS name',
107
+ 'attr.id AS id'
108
+ ])
108
109
  .where('attr.organization_id = :orgId', { orgId })
109
110
  .getRawMany();
110
111
  await this.loggerService.log(
@@ -123,14 +124,20 @@ export class EntityJSONService extends EntityServiceImpl {
123
124
  if (attr.flat_json_key) result[attr.flat_json_key] = null;
124
125
  });
125
126
  linkedAttributes.forEach((link) => {
126
- if (link.applicable_attribute_key)
127
- result[link.applicable_attribute_key] = null;
127
+ // Use target_attribute_key instead of applicable_attribute_key
128
+ if (link.target_attribute_key) result[link.target_attribute_key] = null;
128
129
  });
129
- if(flag === 'all')
130
- return {flat_json: result,attributes: {mainAttributes,relatedAttributes,linkedAttributes}};
131
-
132
- return result;
130
+
131
+ if(flag === 'all') {
132
+ return {
133
+ flat_json: result,
134
+ attributes: { mainAttributes, relatedAttributes, linkedAttributes }
135
+ };
136
+ }
137
+
138
+ return result;
133
139
  }
140
+
134
141
 
135
142
  const dropdown: any[] = [];
136
143
  dropdown.push(