Skip to content

Commit

Permalink
Handle SetModel error, fixes one errcheck report (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
strk authored and bkcsoft committed Feb 12, 2017
1 parent 076f940 commit 9b4f6c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ func runCreateUser(c *cli.Context) error {

setting.NewContext()
models.LoadConfigs()
models.SetEngine()
if err := models.SetEngine(); err != nil {
return fmt.Errorf("models.SetEngine: %v", err)
}

if err := models.CreateUser(&models.User{
Name: c.String("name"),
Expand Down

0 comments on commit 9b4f6c1

Please sign in to comment.