Browse Source

Locating issue

for-closed-social
Unknown 10 years ago
parent
commit
ae92f92dee
3 changed files with 4 additions and 2 deletions
  1. +2
    -0
      models/action.go
  2. +1
    -1
      models/repo.go
  3. +1
    -1
      models/user.go

+ 2
- 0
models/action.go View File

@ -92,10 +92,12 @@ func CommitRepoAction(userId int64, userName string,
// Update repository last update time.
repo, err := GetRepositoryByName(userId, repoName)
if err != nil {
log.Error("action.CommitRepoAction(GetRepositoryByName): %d/%s", userId, repo.LowerName)
return err
}
repo.IsBare = false
if err = UpdateRepository(repo); err != nil {
log.Error("action.CommitRepoAction(UpdateRepository): %d/%s", userId, repo.LowerName)
return err
}

+ 1
- 1
models/repo.go View File

@ -387,7 +387,7 @@ func UpdateRepository(repo *Repository) error {
repo.Website = repo.Website[:255]
}
_, err := orm.Id(repo.Id).UseBool().Cols("description", "website", "updated").Update(repo)
_, err := orm.Id(repo.Id).AllCols().Update(repo)
return err
}

+ 1
- 1
models/user.go View File

@ -211,7 +211,7 @@ func UpdateUser(user *User) (err error) {
user.Website = user.Website[:255]
}
_, err = orm.Id(user.Id).UseBool().Cols("email", "passwd", "avatar", "avatar_email", "website", "location", "is_active", "is_admin", "updated").Update(user)
_, err = orm.Id(user.Id).AllCols().Update(user)
return err
}

Loading…
Cancel
Save