Fix return value of database.Connect method

This commit is contained in:
Arturo Filastò 2018-09-17 17:57:26 +02:00
parent 41f449d6c9
commit aad8a395ed

View File

@ -40,7 +40,8 @@ func Connect(path string) (db sqlbuilder.Database, err error) {
err = RunMigrations(sess.Driver().(*sql.DB))
if err != nil {
db = nil
log.WithError(err).Error("failed to run DB migration")
return nil, err
}
return sess, err
}