This commit is contained in:
Lars 2025-12-14 15:01:58 +01:00
parent cba1337066
commit af73ab9371

View File

@ -58,6 +58,7 @@ def render_graph_explorer_cytoscape(graph_service):
# 1. Daten laden
with st.spinner("Lade Graph..."):
# Wir nutzen die bestehende Logik aus dem Service
nodes_data, edges_data = graph_service.get_ego_graph(center_id)
note_data = graph_service.get_note_with_full_content(center_id)
@ -87,11 +88,13 @@ def render_graph_explorer_cytoscape(graph_service):
cy_elements.append(cy_node)
for e in edges_data:
# Edge
# Edge Fix: e.to statt e.target nutzen!
target_id = getattr(e, "to", getattr(e, "target", None))
cy_edge = {
"data": {
"source": e.source,
"target": e.target,
"target": target_id, # KORRIGIERT
"label": e.label,
"line_color": e.color
}