Skip to content

Commit

Permalink
Merge pull request #30 from signalsciences/FixSiteShortNamesReorder
Browse files Browse the repository at this point in the history
fix build
  • Loading branch information
jhanrahan-sigsci authored Mar 9, 2021
2 parents b44b963 + e68c792 commit 9f02e6c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions provider/resource_corp_signal_tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/signalsciences/go-sigsci"
"reflect"
)

//TODO maybe rename to corp tag
Expand Down Expand Up @@ -71,16 +70,11 @@ func resourceCorpSignalTagUpdate(d *schema.ResourceData, m interface{}) error {
pm := m.(providerMetadata)
sc := pm.Client
corp := pm.Corp
before, err := sc.GetCorpSignalTagByID(corp, d.Id())
if err != nil {
d.SetId("")
return fmt.Errorf("%s. Could not find signaltag to update with ID %s in corp %s", err.Error(), d.Id(), corp)
}
updateSignalTagBody := sigsci.UpdateSignalTagBody{
Description: d.Get("description").(string),
}

_, err = sc.UpdateCorpSignalTagByID(corp, d.Id(), updateSignalTagBody)
_, err := sc.UpdateCorpSignalTagByID(corp, d.Id(), updateSignalTagBody)
if err != nil {
return fmt.Errorf("%s. Could not update signaltag with ID %s in corp %s", err.Error(), d.Id(), corp)
}
Expand Down

0 comments on commit 9f02e6c

Please sign in to comment.