MCPcopy Create free account
hub / github.com/1Panel-dev/MaxKB / node_handle_callback

Function node_handle_callback

apps/application/flow/tools.py:856–874  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

854
855def get_node_handle_callback(source_type, source_id):
856 def node_handle_callback(node):
857 from system_manage.models.resource_mapping import ResourceMapping
858
859 response = []
860 for key, value in target_source_node_mapping.items():
861 if node.get("type") in value:
862 call = value.get(node.get("type"))
863 target_source_id_list = call(node)
864 for target_source_id in target_source_id_list:
865 if target_source_id:
866 response.append(
867 ResourceMapping(
868 source_type=source_type,
869 target_type=key,
870 source_id=source_id,
871 target_id=target_source_id,
872 )
873 )
874 return response
875
876 return node_handle_callback
877

Callers

nothing calls this directly

Calls 3

ResourceMappingClass · 0.90
getMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected