rez_core 4.0.204 → 4.0.206

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.204",
3
+ "version": "4.0.206",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -261,10 +261,14 @@ export class EntityJSONService extends EntityServiceImpl {
261
261
  // Helper: Merge entity data using attribute_key → flat_json_key mapping
262
262
  private mergeEntityDataIntoFlatJson(
263
263
  flatJson: Record<string, any>,
264
- entityData: any[],
264
+ entityData: any | any[], // accept both object or array
265
265
  attrMap: Record<string, string>,
266
266
  ) {
267
- for (const record of entityData) {
267
+ const records = Array.isArray(entityData) ? entityData : [entityData];
268
+
269
+ for (const record of records) {
270
+ if (!record || typeof record !== 'object') continue;
271
+
268
272
  for (const key of Object.keys(record)) {
269
273
  const flatKey = attrMap[key] || key; // map to flat_json_key if exists
270
274
  if (flatJson.hasOwnProperty(flatKey)) {
@@ -274,6 +278,7 @@ export class EntityJSONService extends EntityServiceImpl {
274
278
  }
275
279
  }
276
280
 
281
+
277
282
 
278
283
  private async applyLinkedFilterUsingSavedFilter(
279
284
  childEntityType: string,