mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-23 02:35:17 +01:00
add testing code, fix issue.
This commit is contained in:
parent
3e0829e831
commit
7bb67cf6ce
@ -37,7 +37,7 @@ func AddRepository(repo models.RepoRecord) error {
|
||||
func GetRepositoryByName(name string) (*models.RepoRecord, error) {
|
||||
o := GetOrmer()
|
||||
r := models.RepoRecord{Name: name}
|
||||
err := o.Read(&r)
|
||||
err := o.Read(&r, "Name")
|
||||
if err == orm.ErrNoRows {
|
||||
return nil, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user