rez_core 2.0.31 → 2.0.34

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": "2.0.31",
3
+ "version": "2.0.34",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -110,7 +110,6 @@ export class EntityController {
110
110
  @Req() req: Request & { user: any },
111
111
  ) {
112
112
  let loggedInUser = req.user.userData;
113
- console.log(loggedInUser," loggedInUser");
114
113
  // let loggedInUser = await this.entityService.getEntityData(
115
114
  // ENTITYTYPE_USER,
116
115
  // requestedUser.userId,
@@ -121,18 +120,14 @@ export class EntityController {
121
120
  );
122
121
  }
123
122
 
124
- console.log(entityType,"entityType");
125
123
  const entityMaster =
126
124
  await this.entityMasterService.getEntityData(entityType);
127
- console.log(entityMaster, "entityMaster");
128
125
  const entityService =
129
126
  await this.reflectionHelper.getBean<EntityServiceImpl>(
130
127
  entityMaster.entity_service,
131
128
  );
132
- console.log(entityService, "entityService");
133
129
  if (entityService) {
134
130
  let existingEntity = await entityService.getEntityData(entityType, id);
135
- console.log(existingEntity, "existingEntity");
136
131
  if (!existingEntity) {
137
132
  }
138
133
  // let mergeEntity = JsonUtil.merge(existingEntity, entityData);
@@ -117,12 +117,10 @@ export class EntityServiceImpl implements EntityService<BaseEntity> {
117
117
  id: number,
118
118
  ): Promise<BaseEntity | null> {
119
119
  const entityData = await this.entityMasterService.getEntityData(entityType);
120
- console.log(entityData, 'entityData in getEntityData');
121
120
 
122
121
  const repoService = this.reflectionHelper.getRepoService(
123
122
  entityData.entity_data_class,
124
123
  );
125
- console.log(repoService, 'repoService in getEntityData');
126
124
  if (!repoService) {
127
125
  throw new Error(
128
126
  `Repository service not found for entityType: ${entityType}`,
@@ -174,7 +172,7 @@ export class EntityServiceImpl implements EntityService<BaseEntity> {
174
172
  entityData.modified_date = new Date();
175
173
  if (loggedInUser) {
176
174
  entityData.modified_by = loggedInUser.id;
177
- if (!entityData.organization_id)
175
+ if (!entityData.organization_id && entityData.parent_type !== 'ORG')
178
176
  entityData.organization_id = loggedInUser.organization_id;
179
177
  if (!entityData.enterprise_id)
180
178
  entityData.enterprise_id = loggedInUser.enterprise_id;