fix check condition

This commit is contained in:
Jay 2018-09-24 20:19:14 +08:00
parent b495dee7d4
commit c2b96c69d1

View File

@ -33,10 +33,10 @@ func GetAllFacebookPage() (pages []*FacebookPage, err error) {
func GetFacebookPage(id string) (page *FacebookPage, err error) {
page = &FacebookPage{}
err = x.Get(page, `select * from "public"."facebook_page" where "id" = $1`, id)
if err != sql.ErrNoRows {
return nil, err
}
if err == sql.ErrNoRows {
return nil, nil
}
return
}
// AddPage -