mirror of
https://github.com/sigmasternchen/threadule
synced 2025-03-15 08:09:01 +00:00
only show error if there is one
This commit is contained in:
parent
085caf97f4
commit
2783b3b4b0
1 changed files with 2 additions and 2 deletions
|
@ -36,11 +36,11 @@ func migrate(ctx *app.Context, db *gorm.DB) error {
|
|||
last = err.Error()
|
||||
}
|
||||
}
|
||||
errorString := strings.TrimSpace(errorBuilder.String())
|
||||
ctx.Log.Errorf("migration error: %v", errorString)
|
||||
if errorBuilder.Len() == 0 {
|
||||
return nil
|
||||
} else {
|
||||
errorString := strings.TrimSpace(errorBuilder.String())
|
||||
ctx.Log.Errorf("migration error: %v", errorString)
|
||||
return errors.New(errorString)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue