mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-03-11 17:48:44 -05:00
fix: handle Begin() error in db.NewSession() instead of ignoring it
This commit is contained in:
@@ -408,7 +408,9 @@ func WipeEverything() error {
|
||||
// s.Close() will auto-rollback any uncommitted transaction.
|
||||
func NewSession() *xorm.Session {
|
||||
s := x.NewSession()
|
||||
_ = s.Begin()
|
||||
if err := s.Begin(); err != nil {
|
||||
log.Fatalf("Failed to begin database transaction: %s", err)
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user