Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
priyanka-TL committed Mar 2, 2022
1 parent 51e405a commit c0c9501
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions module/userProjects/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,7 @@ module.exports = class UserProjectsHelper {
let taskReport = {};

updateProject.tasks = await _projectTask(
data.tasks,
false,
"",
removeFieldsFromRequest
data.tasks
);

if (
Expand Down Expand Up @@ -2209,7 +2206,7 @@ function taskArrayBySequence (taskArray, sequenceArray, key) {
* @returns {Object} Project task.
*/

function _projectTask(tasks, isImportedFromLibrary = false, parentTaskId = "", removeFieldsFromRequest = []) {
function _projectTask(tasks, isImportedFromLibrary = false, parentTaskId = "") {

tasks.forEach(singleTask => {

Expand Down Expand Up @@ -2245,12 +2242,9 @@ function _projectTask(tasks, isImportedFromLibrary = false, parentTaskId = "", r
}
}

if ( removeFieldsFromRequest && removeFieldsFromRequest.length > 0 ) {

removeFieldsFromRequest.forEach((removeField) => {
delete singleTask[removeField];
});
}
removeFieldsFromRequest.forEach((removeField) => {
delete singleTask[removeField];
});

if (singleTask.children) {
_projectTask(
Expand Down

0 comments on commit c0c9501

Please sign in to comment.