Browse Source

Fix #933

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
Raphael Randschau 10 năm trước cách đây
mục cha
commit
4f567edc6e
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      models/issue.go

+ 1 - 1
models/issue.go

@@ -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
 }