Skip to content

Commit

Permalink
Update models.go
Browse files Browse the repository at this point in the history
fixed bug
  • Loading branch information
Hanson committed Mar 17, 2015
1 parent b53892b commit 4f2b041
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lectures/lecture8/code/beeblog/models/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func DeleteTopic(tid string) error {
if len(oldCate) > 0 {
cate := new(Category)
qs := o.QueryTable("category")
err = qs.Filter("title", topic.Category).One(cate)
err = qs.Filter("title", oldCate).One(cate)
if err == nil {
cate.TopicCount--
_, err = o.Update(cate)
Expand Down

0 comments on commit 4f2b041

Please sign in to comment.