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

View File

@@ -258,17 +258,16 @@ func (d *Workflow) extractResourcePlantUML(line string, resource resources.Resou
resource.SetName(splitted[1])
splittedComments := strings.Split(line, "'")
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.
instance := d.getNewInstance(dataName, splitted[1], peerID)
if instance == nil {
return "", nil, errors.New("No instance found.")
}
resource.AddInstances(instance)
if len(splittedComments) > 1 {
comment := strings.ReplaceAll(splittedComments[1], "'", "") // for now it's a json.
instance := d.getNewInstance(dataName, splitted[1], peerID)
if instance == nil {
return "", nil, errors.New("No instance found.")
}
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.
graphID := uuid.New()
graphItem := &graph.GraphItem{