mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-24 07:15:43 +00:00
unfinished purchase
This commit is contained in:
@@ -12,7 +12,10 @@ func MapBodyWeights(recordingID uint, items []validation.BodyWeight) []entity.Re
|
||||
|
||||
result := make([]entity.RecordingBW, 0, len(items))
|
||||
for _, item := range items {
|
||||
totalWeight := item.TotalWeight
|
||||
var totalWeight float64
|
||||
if item.TotalWeight != nil {
|
||||
totalWeight = *item.TotalWeight
|
||||
}
|
||||
if totalWeight <= 0 {
|
||||
totalWeight = item.AvgWeight * item.Qty
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user