From 0520cf604c4dc3279d76e1dd4b49c275dd54611e Mon Sep 17 00:00:00 2001 From: xengineering Date: Tue, 12 Mar 2024 18:25:48 +0100 Subject: model: Crash on failed test recipe injection This error used to be silent. Since it is just about test recipes and thus a debugging environment it is best to directly give up and log the error. --- model/database.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/model/database.go b/model/database.go index 265b438..22a924a 100644 --- a/model/database.go +++ b/model/database.go @@ -52,7 +52,10 @@ func InjectTestRecipes() { recipes := RecipeTestData() for _, recipe := range recipes { - recipe.Create() + err := recipe.Create() + if err != nil { + log.Fatalf("Failed to inject test recipe: %v\n", err) + } } } -- cgit v1.2.3-70-g09d2