Fix bug when migrate from API (#8631)

* fix bug when migrate from API

* fix test

* fix test

* improve

* fix error message
This commit is contained in:
Lunny Xiao 2019-11-09 06:21:00 +08:00 committed by techknowlogick
parent 55bdc9aa38
commit f02138a148
4 changed files with 55 additions and 10 deletions

View file

@ -2840,3 +2840,9 @@ func (repo *Repository) GetTreePathLock(treePath string) (*LFSLock, error) {
}
return nil, nil
}
// UpdateRepositoryCols updates repository's columns
func UpdateRepositoryCols(repo *Repository, cols ...string) error {
_, err := x.ID(repo.ID).Cols(cols...).Update(repo)
return err
}