]> source.dussan.org Git - gitea.git/commitdiff
Fix #933
authorRaphael Randschau <nicolai86@me.com>
Fri, 20 Feb 2015 06:52:56 +0000 (07:52 +0100)
committerRaphael Randschau <nicolai86@me.com>
Sat, 21 Feb 2015 08:37:48 +0000 (09:37 +0100)
Not sure why, but xorm ignores the num_issues and num_closed_issues
columns when updating, even though the values changed.

Listing them explicitly fixes the issue with the wrong issue counts

models/issue.go

index d9a24063c2bab6c01e480a2fe4c4244901f9ded6..226ca3ca5789935eadcaa5ce92e0d39410bec9e8 100644 (file)
@@ -561,7 +561,7 @@ func GetLabels(repoId int64) ([]*Label, error) {
 
 // UpdateLabel updates label information.
 func UpdateLabel(l *Label) error {
-       _, err := x.Id(l.Id).Update(l)
+       _, err := x.Id(l.Id).AllCols().Update(l)
        return err
 }