ZahirJS commited on
Commit
0ff231b
·
verified ·
1 Parent(s): 836921f

Update entity_relationship_generator.py

Browse files
Files changed (1) hide show
  1. entity_relationship_generator.py +3 -2
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'<U><B>{attr_name}</B></U>',
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'<U>{attr_name}</U>',
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',