diff options
Diffstat (limited to 'model/database.go')
-rw-r--r-- | model/database.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/model/database.go b/model/database.go index 85d2662..f5fd67a 100644 --- a/model/database.go +++ b/model/database.go @@ -149,8 +149,8 @@ func MigrateDatabase(execVersion string) { } } -func InjectTestRecipes() { - Transaction(func(tx *sql.Tx) error { +func InjectExampleRecipes() { + err := Transaction(func(tx *sql.Tx) error { recipes := RecipeTestData() for _, recipe := range recipes { @@ -162,6 +162,9 @@ func InjectTestRecipes() { return nil }) + if err != nil { + log.Fatalf("Failed to inject example recipes: %v", err) + } } func DisconnectDatabase() { |