This commit is contained in:
mr
2026-03-17 13:19:51 +01:00
parent 1ac735cef1
commit 088b45b2cf

View File

@@ -258,9 +258,7 @@ func (d *Workflow) extractResourcePlantUML(line string, resource resources.Resou
resource.SetName(splitted[1]) resource.SetName(splitted[1])
splittedComments := strings.Split(line, "'") splittedComments := strings.Split(line, "'")
if len(splittedComments) <= 1 { if len(splittedComments) > 1 {
return "", nil, errors.New("Can't deserialize Object, there's no commentary")
}
comment := strings.ReplaceAll(splittedComments[1], "'", "") // for now it's a json. comment := strings.ReplaceAll(splittedComments[1], "'", "") // for now it's a json.
instance := d.getNewInstance(dataName, splitted[1], peerID) instance := d.getNewInstance(dataName, splitted[1], peerID)
if instance == nil { if instance == nil {
@@ -269,6 +267,7 @@ func (d *Workflow) extractResourcePlantUML(line string, resource resources.Resou
resource.AddInstances(instance) resource.AddInstances(instance)
json.Unmarshal([]byte(comment), instance) json.Unmarshal([]byte(comment), instance)
}
// deserializer les instances... une instance doit par défaut avoir certaines valeurs d'accès. // deserializer les instances... une instance doit par défaut avoir certaines valeurs d'accès.
graphID := uuid.New() graphID := uuid.New()
graphItem := &graph.GraphItem{ graphItem := &graph.GraphItem{