@@ -987,6 +987,7 @@ var treeObject = {
987987 return return_object ;
988988 } ,
989989 update_tree_lineage : function ( tree_array , external_object , mode , add_object , previous_object , auth_data_id ) {
990+ console . log ( ">>>>>>>>>>>>>>>>>> inside update_tree_lineage " , add_object ) ;
990991 var history_object = add_object . history [ add_object . history . length - 1 ] , // get last element of the array
991992 update_records = [ ] ,
992993 delete_records = [ ] ,
@@ -1843,7 +1844,9 @@ var treeObject = {
18431844 if ( ! data_id ) {
18441845 return_object = error_definitions . error_data_id ;
18451846 } // data_id must exist
1846- this . security_check ( user_id , "delete_from_node_name_tree" , portal_id , function ( isAuthorized ) {
1847+
1848+ // console.log("this>>>>>>>>>>>>", self);
1849+ self . security_check ( user_id , "delete_from_node_name_tree" , portal_id , function ( isAuthorized ) {
18471850 if ( ! return_object . error && isAuthorized ) {
18481851 if ( debug == 2 ) console . log ( "past security" ) ;
18491852 if ( ! node_name && node_id ) {
@@ -1897,8 +1900,10 @@ var treeObject = {
18971900 if ( debug == 2 ) console . log ( {
18981901 return_object
18991902 } ) ;
1900- if ( ! return_object . result || target == "child" )
1903+ //if (!return_object.result || target=="child") //changed on 07/022018 when trying to implement code as api-endpoit for app.
1904+ if ( ! return_object . result )
19011905 {
1906+ console . log ( "Comes in this case before going to return error >>>>>>>>>" , ! return_object . result , target ) ;
19021907 callback ( error_definitions . error_empty ) ;
19031908 }
19041909 else
0 commit comments