ensurePricing
This commit is contained in:
@@ -59,6 +59,8 @@ func (abs *PricedResource[T]) GetCreatorID() string {
|
||||
return abs.CreatorID
|
||||
}
|
||||
|
||||
// IsPurchasable and IsBooked fall back to false when SelectedPricing is a nil interface.
|
||||
// Concrete types (PricedComputeResource, etc.) override these and guarantee non-nil pricing.
|
||||
func (abs *PricedResource[T]) IsPurchasable() bool {
|
||||
if any(abs.SelectedPricing) == nil {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user