Merge pull request #122 in YUNIONIO/onecloud from ~QUXUAN/onecloud:bugfix/qx-secrule-sync to release/2.1.0

* commit 'c073766ccce803e5938bb32d33561aaffca08df6':
  修复更新secrules失败bug
This commit is contained in:
邱剑
2018-08-25 17:08:15 +08:00
+1 -1
View File
@@ -328,7 +328,7 @@ func (manager *SSecurityGroupRuleManager) SyncRules(ctx context.Context, userCre
cmp := strings.Compare(dbStr, ruleStr)
if cmp == 0 {
if dbRules[j].Description != rules[i].Description {
if _, err := manager.TableSpec().Update(dbRules[j], func() error {
if _, err := manager.TableSpec().Update(&dbRules[j], func() error {
dbRules[j].Description = rules[i].Description
return nil
}); err != nil {