Adjust + Test
This commit is contained in:
@@ -2,7 +2,6 @@ package resources
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"cloud.o-forge.io/core/oc-lib/models/booking"
|
||||
@@ -62,7 +61,6 @@ func (abs *PricedResource) IsPurchasable() bool {
|
||||
}
|
||||
|
||||
func (abs *PricedResource) IsBooked() bool {
|
||||
return true // For dev purposes, prevent that DB objects that don't have a Pricing are considered as not booked
|
||||
if abs.SelectedPricing == nil {
|
||||
return false
|
||||
}
|
||||
@@ -126,7 +124,6 @@ func (r *PricedResource) GetPriceHT() (float64, error) {
|
||||
if r.BookingConfiguration == nil {
|
||||
r.BookingConfiguration = &BookingConfiguration{}
|
||||
}
|
||||
fmt.Println("GetPriceHT", r.BookingConfiguration.UsageStart, r.BookingConfiguration.UsageEnd)
|
||||
if r.BookingConfiguration.UsageStart == nil {
|
||||
r.BookingConfiguration.UsageStart = &now
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user