Update error handling

Code review suggestion

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Katos
2024-06-22 17:26:39 +01:00
committed by GitHub
parent b57efa02ff
commit 8a57ca41bf

View File

@@ -104,7 +104,7 @@ func (ctrl *V1Controller) GetLocationWithPrice(auth context.Context, GID uuid.UU
for _, childLocation := range location.Children {
var childLocation, err = ctrl.GetLocationWithPrice(auth, GID, childLocation.ID)
if err != nil {
fmt.Println(err)
return repo.LocationOut{}, err
}
location.TotalPrice += childLocation.TotalPrice
}