From c6880eb6b8eb8e8c54cd18cac5e1c8c9728e53b5 Mon Sep 17 00:00:00 2001 From: vaishali k Date: Mon, 12 Jan 2026 11:26:10 +0530 Subject: [PATCH 1/2] Issue #000 fix: if entityId is passed to the importFromLibray, error is thrown in entity helper as tenant_id is required --- generics/services/entity-management.js | 1 + module/userProjects/helper.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/generics/services/entity-management.js b/generics/services/entity-management.js index e85801fd..491cc18b 100644 --- a/generics/services/entity-management.js +++ b/generics/services/entity-management.js @@ -65,6 +65,7 @@ const entityDocuments = function ( headers: { 'content-type': 'application/json', 'internal-access-token': process.env.INTERNAL_ACCESS_TOKEN, + 'tenant-id': filterData.tenantId ? filterData.tenantId : '', }, json: requestJSON, } diff --git a/module/userProjects/helper.js b/module/userProjects/helper.js index 75e9f6a9..2135b0e0 100644 --- a/module/userProjects/helper.js +++ b/module/userProjects/helper.js @@ -1291,7 +1291,7 @@ module.exports = class UserProjectsHelper { "programId": "685140cbf891ccf74e05baf9", "observationId": "685146542054fe175c7150c8", "solutionId": "685140d1ffc25f705c56e99e", - } + } } */ @@ -3089,7 +3089,7 @@ module.exports = class UserProjectsHelper { // If it is valid make sure we add those data to newly creating projects if (requestedData.entityId && requestedData.entityId !== '') { let entityInformation = await entitiesService.entityDocuments( - { _id: requestedData.entityId }, + { _id: requestedData.entityId, tenantId: tenantId }, CONSTANTS.common.ALL ) @@ -4322,7 +4322,7 @@ module.exports = class UserProjectsHelper { * deleteUserPIIData function to delete users Data. * @method * @name deleteUserPIIData - * @param {userDeleteEvent} - userDeleteEvent message object + * @param {userDeleteEvent} - userDeleteEvent message object * { "entity": "user", "eventType": "delete", From 119f728cc4f6804b859ee038f7e8db843d99ac20 Mon Sep 17 00:00:00 2001 From: vaishali k Date: Mon, 12 Jan 2026 11:56:34 +0530 Subject: [PATCH 2/2] Issue #000 fix: if entityId is passed to the importFromLibray, error is thrown in entity helper as tenant_id is required --- generics/services/entity-management.js | 1 - 1 file changed, 1 deletion(-) diff --git a/generics/services/entity-management.js b/generics/services/entity-management.js index 491cc18b..e85801fd 100644 --- a/generics/services/entity-management.js +++ b/generics/services/entity-management.js @@ -65,7 +65,6 @@ const entityDocuments = function ( headers: { 'content-type': 'application/json', 'internal-access-token': process.env.INTERNAL_ACCESS_TOKEN, - 'tenant-id': filterData.tenantId ? filterData.tenantId : '', }, json: requestJSON, }