add purchase resource in model catalog

This commit is contained in:
mr
2025-02-11 09:16:18 +01:00
parent ffaa67fb5d
commit d82ae166a1
5 changed files with 5 additions and 6 deletions

View File

@@ -86,7 +86,7 @@ func (r *PricedResource) GetPrice() (float64, error) {
if len(r.PricingProfiles) == 0 {
return 0, errors.New("pricing profile must be set on Priced Resource " + r.ResourceID)
}
*r.SelectedPricing = r.PricingProfiles[0]
r.SelectedPricing = &r.PricingProfiles[0]
}
pricing := *r.SelectedPricing
return pricing.GetPrice(1, 0, *r.UsageStart, *r.UsageEnd)