Skip to content

Commit

Permalink
GH-853: Allow deleting branding resource even on free tenants (#875)
Browse files Browse the repository at this point in the history
Allow deleting branding resource even on free tenants
  • Loading branch information
sergiught authored Nov 9, 2023
1 parent 0a39d61 commit c9968e0
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions internal/auth0/branding/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,10 @@ func updateBranding(ctx context.Context, data *schema.ResourceData, meta interfa
func deleteBranding(ctx context.Context, _ *schema.ResourceData, meta interface{}) diag.Diagnostics {
api := meta.(*config.Config).GetAPI()

if err := checkForCustomDomains(ctx, api); err != nil {
if err == errNoCustomDomain {
return nil
if err := checkForCustomDomains(ctx, api); err == nil {
if err := api.Branding.DeleteUniversalLogin(ctx); err != nil {
return diag.FromErr(err)
}

return diag.FromErr(err)
}

if err := api.Branding.DeleteUniversalLogin(ctx); err != nil {
return diag.FromErr(err)
}

return nil
Expand Down

0 comments on commit c9968e0

Please sign in to comment.