From 3d9e739662c14fc45c394c5952bd58420b70a123 Mon Sep 17 00:00:00 2001 From: aunefyren Date: Wed, 18 Sep 2024 12:14:55 +0200 Subject: [PATCH] Update wheelview.go --- controllers/wheelview.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/controllers/wheelview.go b/controllers/wheelview.go index aea6e8d..792b0ca 100644 --- a/controllers/wheelview.go +++ b/controllers/wheelview.go @@ -3,6 +3,7 @@ package controllers import ( "aunefyren/treningheten/database" "aunefyren/treningheten/models" + "errors" "log" ) @@ -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)