Skip to content

Commit

Permalink
fix bug and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Sep 25, 2017
1 parent 4d0f112 commit 5ed36ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion models/org_team.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ func UpdateTeam(t *Team, authChanged bool) (err error) {
return ErrTeamAlreadyExist{t.OrgID, t.LowerName}
}

if _, err = sess.Id(t.ID).Cols("description, lower_name").Update(t); err != nil {
if _, err = sess.Id(t.ID).AllCols().Update(t); err != nil {
return fmt.Errorf("update: %v", err)
}

Expand Down
2 changes: 1 addition & 1 deletion models/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ func updateUserCols(e Engine, u *User, cols ...string) error {
u.Website = base.TruncateString(u.Website, 255)
u.Description = base.TruncateString(u.Description, 255)

_, err := x.Id(u.ID).Cols(cols...).Update(u)
_, err := e.Id(u.ID).Cols(cols...).Update(u)
return err
}

Expand Down

0 comments on commit 5ed36ba

Please sign in to comment.