add testing code, fix issue.

This commit is contained in:
wy65701436 2016-08-31 03:05:34 -07:00
parent 3e0829e831
commit 7bb67cf6ce

View File

@ -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
}