Skip to content

Commit

Permalink
Update wheelview.go
Browse files Browse the repository at this point in the history
  • Loading branch information
aunefyren committed Sep 18, 2024
1 parent 2e73508 commit 3d9e739
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controllers/wheelview.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package controllers
import (
"aunefyren/treningheten/database"
"aunefyren/treningheten/models"
"errors"
"log"
)

Expand All @@ -24,7 +25,7 @@ func ConvertWheelviewToWheelviewObject(wheelview models.Wheelview) (models.Wheel
return models.WheelviewObject{}, err
} else if !debtFound {
log.Println("Failed to find debt for debt '" + wheelview.DebtID.String() + "'. Returning.")
return models.WheelviewObject{}, err
return models.WheelviewObject{}, errors.New("Failed to find debt for debt '" + wheelview.DebtID.String() + "'.")
}

debtObject, err := ConvertDebtToDebtObject(debt)
Expand Down

0 comments on commit 3d9e739

Please sign in to comment.