2 Commits

Author SHA1 Message Date
matst80
13dcb1ec45 Update mutation_upsert_subscriptiondetails.go
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 49s
Build and Publish / BuildAndDeployArm64 (push) Successful in 4m50s
2025-11-19 08:11:49 +01:00
matst80
4fa78e786f allow own ids 2025-11-19 08:10:28 +01:00
2 changed files with 7 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ jobs:
BuildAndDeployArm64: BuildAndDeployArm64:
runs-on: arm64 runs-on: arm64
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v4
- name: Build arm64 image - name: Build arm64 image
run: | run: |
docker build \ docker build \

View File

@@ -39,7 +39,12 @@ func UpsertSubscriptionDetails(g *CartGrain, m *messages.UpsertSubscriptionDetai
// Update existing entry. // Update existing entry.
existing, ok := g.SubscriptionDetails[*m.Id] existing, ok := g.SubscriptionDetails[*m.Id]
if !ok { if !ok {
return fmt.Errorf("subscription details not found") n := &SubscriptionDetails{
Id: *m.Id,
Version: 1,
}
g.SubscriptionDetails[*m.Id] = n
existing = n
} }
changed := false changed := false
if m.OfferingCode != "" { if m.OfferingCode != "" {