diff --git a/Gopkg.toml b/Gopkg.toml index 25d49b43..4e56f55e 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -27,11 +27,11 @@ [[constraint]] name = "github.com/PuerkitoBio/goquery" - version = "1.3.0" + version = "1.4.1" [[constraint]] name = "github.com/astaxie/beego" - version = "1.9.2" + version = "1.10.0" [[constraint]] name = "github.com/boombuler/barcode" @@ -39,7 +39,7 @@ [[constraint]] name = "github.com/go-sql-driver/mysql" - version = "1.3.0" + version = "1.4.0" [[constraint]] branch = "master" @@ -51,7 +51,7 @@ [[constraint]] name = "github.com/mattn/go-sqlite3" - version = "1.6.0" + version = "1.9.0" [[constraint]] branch = "master" diff --git a/models/Blog.go b/models/Blog.go index f296ebe2..b0c2a737 100644 --- a/models/Blog.go +++ b/models/Blog.go @@ -219,6 +219,9 @@ func (b *Blog) FindToPager(pageIndex, pageSize int,memberId int,status string) ( _,err = query.OrderBy("-order_index","-blog_id").Offset(offset).Limit(pageSize).All(&blogList) if err != nil { + if err == orm.ErrNoRows { + err = nil + } beego.Error("获取文章列表时出错 ->",err) return }