validator use test

This commit is contained in:
mr
2024-07-19 09:32:58 +02:00
parent 071a49cd81
commit e838474835
8 changed files with 61 additions and 9 deletions

View File

@@ -37,6 +37,16 @@ func (dma *Workflow) Deserialize(j map[string]interface{}) utils.DBObject {
return dma
}
func (dma *Workflow) Serialize() map[string]interface{} {
var m map[string]interface{}
b, err := json.Marshal(dma)
if err != nil {
return nil
}
json.Unmarshal(b, dma)
return m
}
func (w *Workflow) isDCLink(link graph.GraphLink) bool {
if _, exists := w.Datacenters[link.Destination.ID]; exists {
return true