Browse Source

BugFix on graphviz backend with new EmField

Yann Weber 9 years ago
parent
commit
aaa39feeea
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      EditorialModel/backend/graphviz.py

+ 5
- 2
EditorialModel/backend/graphviz.py View File

@@ -1,6 +1,7 @@
1 1
 # -*- coding: utf-8 -*-
2 2
 
3 3
 import datetime
4
+import EditorialModel
4 5
 from EditorialModel.classtypes import EmClassType
5 6
 from EditorialModel.fieldgroups import EmFieldGroup
6 7
 from EditorialModel.types import EmType
@@ -88,7 +89,8 @@ class EmBackendGraphviz(object):
88 89
             for f in c.fields():
89 90
                 if ((cn == 'EmType' and f.optional) or (cn == 'EmFieldGroup' and not f.optional)) and f.rel_field_id is None:
90 91
                     
91
-                    if not (f.rel_to_type_id is None):
92
+                    #if not (f.rel_to_type_id is None):
93
+                    if isinstance(f, EditorialModel.fieldtypes.rel2type.EmFieldRel2Type):
92 94
                         rel_node_id = '%s%s'%(EmBackendGraphviz._component_id(c), EmBackendGraphviz._component_id(em.component(f.rel_to_type_id)))
93 95
 
94 96
                         rel_node = '\t%s [ label="rel_to_type'%rel_node_id
@@ -114,7 +116,8 @@ class EmBackendGraphviz(object):
114 116
                     if first:
115 117
                         ret += ' { '
116 118
                         first = False
117
-                    if not (f.rel_to_type_id is None):
119
+                    #if not (f.rel_to_type_id is None):
120
+                    if isinstance(f, EditorialModel.fieldtypes.rel2type.EmFieldRel2Type):
118 121
                         ret += '<f%d> '%cntref
119 122
                         cntref += 1
120 123
                     ret += f.name

Loading…
Cancel
Save