Skip to content

Commit

Permalink
Merge pull request #11 from BESTSELLER/fix-delete
Browse files Browse the repository at this point in the history
fixed id extraction for deleting resource
  • Loading branch information
Andrei-Predoiu authored Oct 26, 2022
2 parents 5387eb0 + ae0c318 commit 73f7a53
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions internal/resource/resource_database_row.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,12 @@ func tableRowDelete(_ context.Context, d *schema.ResourceData, m interface{}) di
c := m.(*client.Client)
// Warning or errors can be collected in a slice type
var diags diag.Diagnostics
split := strings.Split(d.Id(), `\`)
tableID := split[0]
sysID := split[1]

err := c.DeleteTableRow(tableID, sysID)
tableID, sysID, err := ExtractIDs(d.Id())
if err != nil {
diags = append(diags, diag.FromErr(err)...)
return diags
}
err = c.DeleteTableRow(tableID, sysID)
if err != nil {
diags = append(diags, diag.FromErr(err)...)
return diags
Expand Down

0 comments on commit 73f7a53

Please sign in to comment.