@@ -770,14 +770,12 @@ def link_dataset_to_direct_ancestors(property_key, normalized_type, user_token,
770770
771771 direct_ancestor_uuids = existing_data_dict ['direct_ancestor_uuids' ]
772772
773- # Generate property values for each Activity node
774- count = len (direct_ancestor_uuids )
775- activity_data_dict_list = schema_manager .generate_activity_data (normalized_type , user_token , existing_data_dict , count )
773+ # Generate property values for Activity node
774+ activity_data_dict = schema_manager .generate_activity_data (normalized_type , user_token , existing_data_dict )
776775
777776 try :
778- # Create a linkage (via Activity node) between the dataset node
779- # and each direct ancestor node in neo4j
780- schema_neo4j_queries .link_entity_to_direct_ancestors (schema_manager .get_neo4j_driver_instance (), existing_data_dict ['uuid' ], direct_ancestor_uuids , activity_data_dict_list )
777+ # Create a linkage (via one Activity node) between the dataset node and its direct ancestors in neo4j
778+ schema_neo4j_queries .link_entity_to_direct_ancestors (schema_manager .get_neo4j_driver_instance (), existing_data_dict ['uuid' ], direct_ancestor_uuids , activity_data_dict )
781779 except TransactionError :
782780 # No need to log
783781 raise
@@ -1177,14 +1175,13 @@ def link_donor_to_lab(property_key, normalized_type, user_token, existing_data_d
11771175 # Only one uuid in the list in this case
11781176 direct_ancestor_uuids = [existing_data_dict ['group_uuid' ]]
11791177
1180- # Generate property values for Activity
1181- # Only one Activity in this case, using the default count = 1
1182- activity_data_dict_list = schema_manager .generate_activity_data (normalized_type , user_token , existing_data_dict )
1178+ # Generate property values for Activity node
1179+ activity_data_dict = schema_manager .generate_activity_data (normalized_type , user_token , existing_data_dict )
11831180
11841181 try :
11851182 # Create a linkage (via Activity node)
11861183 # between the Donor node and the parent Lab node in neo4j
1187- schema_neo4j_queries .link_entity_to_direct_ancestors (schema_manager .get_neo4j_driver_instance (), existing_data_dict ['uuid' ], direct_ancestor_uuids , activity_data_dict_list )
1184+ schema_neo4j_queries .link_entity_to_direct_ancestors (schema_manager .get_neo4j_driver_instance (), existing_data_dict ['uuid' ], direct_ancestor_uuids , activity_data_dict )
11881185 except TransactionError :
11891186 # No need to log
11901187 raise
@@ -1304,14 +1301,13 @@ def link_sample_to_direct_ancestor(property_key, normalized_type, user_token, ex
13041301 # Only one uuid in the list in this case
13051302 direct_ancestor_uuids = [existing_data_dict ['direct_ancestor_uuid' ]]
13061303
1307- # Generate property values for Activity
1308- # Only one Activity in this case, using the default count = 1
1309- activity_data_dict_list = schema_manager .generate_activity_data (normalized_type , user_token , existing_data_dict )
1304+ # Generate property values for Activity node
1305+ activity_data_dict = schema_manager .generate_activity_data (normalized_type , user_token , existing_data_dict )
13101306
13111307 try :
13121308 # Create a linkage (via Activity node)
13131309 # between the Sample node and the source entity node in neo4j
1314- schema_neo4j_queries .link_entity_to_direct_ancestors (schema_manager .get_neo4j_driver_instance (), existing_data_dict ['uuid' ], direct_ancestor_uuids , activity_data_dict_list )
1310+ schema_neo4j_queries .link_entity_to_direct_ancestors (schema_manager .get_neo4j_driver_instance (), existing_data_dict ['uuid' ], direct_ancestor_uuids , activity_data_dict )
13151311 except TransactionError :
13161312 # No need to log
13171313 raise
@@ -1412,14 +1408,13 @@ def link_upload_to_lab(property_key, normalized_type, user_token, existing_data_
14121408 # Only one uuid in the list in this case
14131409 direct_ancestor_uuids = [existing_data_dict ['group_uuid' ]]
14141410
1415- # Generate property values for Activity
1416- # Only one Activity in this case, using the default count = 1
1417- activity_data_dict_list = schema_manager .generate_activity_data (normalized_type , user_token , existing_data_dict )
1411+ # Generate property values for Activity node
1412+ activity_data_dict = schema_manager .generate_activity_data (normalized_type , user_token , existing_data_dict )
14181413
14191414 try :
14201415 # Create a linkage (via Activity node)
14211416 # between the Submission node and the parent Lab node in neo4j
1422- schema_neo4j_queries .link_entity_to_direct_ancestors (schema_manager .get_neo4j_driver_instance (), existing_data_dict ['uuid' ], direct_ancestor_uuids , activity_data_dict_list )
1417+ schema_neo4j_queries .link_entity_to_direct_ancestors (schema_manager .get_neo4j_driver_instance (), existing_data_dict ['uuid' ], direct_ancestor_uuids , activity_data_dict )
14231418 except TransactionError :
14241419 # No need to log
14251420 raise
0 commit comments