diff --git a/models/resources/data.go b/models/resources/data.go index 520e972..eb3f6b5 100644 --- a/models/resources/data.go +++ b/models/resources/data.go @@ -55,14 +55,14 @@ type DataInstance struct { func (ri *DataInstance) StoreDraftDefault() { found := false - for _, p := range ri.ResourceInstance.Outputs { + for _, p := range ri.ResourceInstance.Env { if p.Attr == "source" { found = true break } } if !found { - ri.ResourceInstance.Outputs = append(ri.ResourceInstance.Outputs, models.Param{ + ri.ResourceInstance.Env = append(ri.ResourceInstance.Env, models.Param{ Attr: "source", Value: ri.Source, Readonly: true, diff --git a/models/resources/storage.go b/models/resources/storage.go index 6553ae3..10bb53a 100644 --- a/models/resources/storage.go +++ b/models/resources/storage.go @@ -55,14 +55,14 @@ type StorageResourceInstance struct { func (ri *StorageResourceInstance) StoreDraftDefault() { found := false - for _, p := range ri.ResourceInstance.Outputs { + for _, p := range ri.ResourceInstance.Env { if p.Attr == "source" { found = true break } } if !found { - ri.ResourceInstance.Outputs = append(ri.ResourceInstance.Outputs, models.Param{ + ri.ResourceInstance.Env = append(ri.ResourceInstance.Env, models.Param{ Attr: "source", Value: ri.Source, Readonly: true,