Browse Source

migration: handle edge case

pull/3802/merge
Unknwon 8 years ago
parent
commit
78145cd166
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 4
      models/migrations/v15.go

4
models/migrations/v15.go

@ -50,6 +50,10 @@ func generateAndMigrateGitHooks(x *xorm.Engine) (err error) {
return x.Where("id > 0").Iterate(new(Repository),
func(idx int, bean interface{}) error {
repo := bean.(*Repository)
if repo.Name == "." || repo.Name == ".." {
return nil
}
user := new(User)
has, err := x.Where("id = ?", repo.OwnerID).Get(user)
if err != nil {

Loading…
Cancel
Save