Spaces:
Running
Running
Update entity_relationship_generator.py
Browse files
entity_relationship_generator.py
CHANGED
@@ -67,10 +67,11 @@ def generate_entity_relationship_diagram(json_input: str, output_format: str) ->
|
|
67 |
|
68 |
attr_id = f"{entity_name}_attr_{i}"
|
69 |
|
|
|
70 |
if attr_type == 'primary_key':
|
71 |
dot.node(
|
72 |
attr_id,
|
73 |
-
f'
|
74 |
shape='ellipse',
|
75 |
style='filled',
|
76 |
fillcolor='#d8d8d8',
|
@@ -81,7 +82,7 @@ def generate_entity_relationship_diagram(json_input: str, output_format: str) ->
|
|
81 |
elif attr_type == 'partial_key':
|
82 |
dot.node(
|
83 |
attr_id,
|
84 |
-
f'
|
85 |
shape='ellipse',
|
86 |
style='filled,dashed',
|
87 |
fillcolor='#d8d8d8',
|
|
|
67 |
|
68 |
attr_id = f"{entity_name}_attr_{i}"
|
69 |
|
70 |
+
# CAMBIO CLAVE: Removemos HTML markup que puede causar problemas
|
71 |
if attr_type == 'primary_key':
|
72 |
dot.node(
|
73 |
attr_id,
|
74 |
+
f'{attr_name} (PK)',
|
75 |
shape='ellipse',
|
76 |
style='filled',
|
77 |
fillcolor='#d8d8d8',
|
|
|
82 |
elif attr_type == 'partial_key':
|
83 |
dot.node(
|
84 |
attr_id,
|
85 |
+
f'{attr_name} (Partial)',
|
86 |
shape='ellipse',
|
87 |
style='filled,dashed',
|
88 |
fillcolor='#d8d8d8',
|