rez_core 5.0.9 → 5.0.11

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": "5.0.9",
3
+ "version": "5.0.11",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -667,16 +667,15 @@ export class EntityDynamicService {
667
667
  entityType: string,
668
668
  organizationId: string,
669
669
  ): Promise<string> {
670
- const result = await this.dataSource.query(
671
- `SELECT db_table_name FROM frm_entity_master WHERE organization_id = $1 AND mapped_entity_type = $2`,
672
- [organizationId, entityType],
673
- );
674
670
 
675
- if (!result.length) {
671
+ let entityMaster = await this.entityMasterRepo.getEntityByMappedEntityType(entityType, organizationId);
672
+
673
+ if (!entityMaster) {
676
674
  console.log(`Entity type '${entityType}' not found in frm_entity_master`);
675
+ throw new BadRequestException();
677
676
  }
678
677
 
679
- return result[0].db_table_name;
678
+ return entityMaster.db_table_name;
680
679
  }
681
680
 
682
681
  private async getAttributeCodes(
@@ -288,7 +288,7 @@ export class TaskService extends EntityServiceImpl {
288
288
  params.push(mapped_entity_type);
289
289
 
290
290
  whereClauses.push(`t.mapped_entity_id = $${idx++}`);
291
- params.push(Number(mapped_entity_id));
291
+ params.push(String(mapped_entity_id));
292
292
 
293
293
  // Optional filters
294
294
  if (status) {