Skip to content

Commit

Permalink
fix code
Browse files Browse the repository at this point in the history
  • Loading branch information
unknwon committed Jan 18, 2015
1 parent 611301a commit b53892b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lectures/lecture4/code/beeblog/models/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ func RegisterDB() {
func AddCategory(name string) error {
o := orm.NewOrm()

cate := &Category{Title: name}
cate := &Category{
Title: name,
Created: time.Now(),
TopicTime: time.Now(),
}

// 查询数据
qs := o.QueryTable("category")
Expand Down

0 comments on commit b53892b

Please sign in to comment.