From 3e7e9ee2892ba136d527c1fa3538554f415fbfe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Justin=20Nu=C3=9F?= Date: Thu, 24 Jul 2014 20:07:07 +0200 Subject: [PATCH] Fix #303. Specify updated columns explicitly. --- models/issue.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/issue.go b/models/issue.go index 05c95253..a2a7ff64 100644 --- a/models/issue.go +++ b/models/issue.go @@ -768,7 +768,7 @@ func ChangeMilestoneAssign(oldMid, mid int64, issue *Issue) (err error) { m.Completeness = 0 } - if _, err = sess.Id(m.Id).Update(m); err != nil { + if _, err = sess.Id(m.Id).Cols("num_issues,num_completeness,num_closed_issues").Update(m); err != nil { sess.Rollback() return err } @@ -796,7 +796,7 @@ func ChangeMilestoneAssign(oldMid, mid int64, issue *Issue) (err error) { } m.Completeness = m.NumClosedIssues * 100 / m.NumIssues - if _, err = sess.Id(m.Id).Update(m); err != nil { + if _, err = sess.Id(m.Id).Cols("num_issues,num_completeness,num_closed_issues").Update(m); err != nil { sess.Rollback() return err }