Changeset 0.10.0 (#56)
This commit is contained in:
@@ -76,6 +76,17 @@ func syncProviderModels(ctx context.Context, stores store.Stores, cfg *models.Pr
|
||||
return syncResult{}, fmt.Errorf("failed to sync: %w", err)
|
||||
}
|
||||
|
||||
// Sync pricing from provider catalog (won't overwrite manual admin overrides)
|
||||
if stores.Pricing != nil {
|
||||
for _, m := range provModels {
|
||||
if m.Pricing != nil {
|
||||
if err := stores.Pricing.UpsertFromCatalog(ctx, cfg.ID, m.ID, m.Pricing); err != nil {
|
||||
log.Printf("warn: pricing sync for %s/%s failed: %v", cfg.ID, m.ID, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return syncResult{Added: added, Updated: updated, Total: len(provModels)}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user