From 837c06ec1bf10284ea8e0c1514712e76d1bd90a0 Mon Sep 17 00:00:00 2001 From: Mauricio Araujo Date: Fri, 5 Apr 2024 16:16:21 -0400 Subject: [PATCH] Add default prefix for Metronome customer (#4505) --- internal/billing/metronome.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/billing/metronome.go b/internal/billing/metronome.go index a5a385f398..424c2f009a 100644 --- a/internal/billing/metronome.go +++ b/internal/billing/metronome.go @@ -43,8 +43,13 @@ func (m MetronomeClient) createCustomer(ctx context.Context, orgName string, pro path := "customers" projIDStr := strconv.FormatUint(uint64(projectID), 10) + prefix := "Project" + if orgName != "" { + prefix = orgName + } + customer := types.Customer{ - Name: fmt.Sprintf("%s - %s", orgName, projectName), + Name: fmt.Sprintf("%s - %s", prefix, projectName), Aliases: []string{ projIDStr, },