@@ -193,10 +193,7 @@ def get_children(neo4j_driver, uuid, property_key = None):
193193 else :
194194 # Convert the list of nodes to a list of dicts
195195 results = nodes_to_dicts (record [record_field_name ])
196- if fields_to_omit :
197- for node_dict in results :
198- for field in fields_to_omit :
199- node_dict .pop (field , None )
196+
200197 return results
201198
202199
@@ -248,10 +245,6 @@ def get_parents(neo4j_driver, uuid, property_key = None):
248245 else :
249246 # Convert the list of nodes to a list of dicts
250247 results = nodes_to_dicts (record [record_field_name ])
251- if fields_to_omit :
252- for node_dict in results :
253- for field in fields_to_omit :
254- node_dict .pop (field , None )
255248
256249 return results
257250
@@ -417,11 +410,6 @@ def get_ancestors(neo4j_driver, uuid, property_key = None):
417410 # Convert the list of nodes to a list of dicts
418411 results = nodes_to_dicts (record [record_field_name ])
419412
420- if fields_to_omit :
421- for node_dict in results :
422- for field in fields_to_omit :
423- node_dict .pop (field , None )
424-
425413 return results
426414
427415"""
@@ -472,10 +460,7 @@ def get_descendants(neo4j_driver, uuid, property_key = None):
472460 else :
473461 # Convert the list of nodes to a list of dicts
474462 results = nodes_to_dicts (record [record_field_name ])
475- if fields_to_omit :
476- for node_dict in results :
477- for field in fields_to_omit :
478- node_dict .pop (field , None )
463+
479464 return results
480465
481466
0 commit comments