Merge pull request #736 from Zexi/bugfix/resource-set-schedtags

fix: resource set schedtags
This commit is contained in:
yunion-ci-robot
2019-05-07 12:16:16 +08:00
committed by GitHub
+1 -1
View File
@@ -402,7 +402,7 @@ func PerformSetResourceSchedtag(obj IModelWithSchedtag, ctx context.Context, use
return nil, httperrors.NewGeneralError(fmt.Errorf("Get old joint schedtags: %v", err))
}
for _, oldTag := range oldTags {
if !utils.IsInStringArray(oldTag.GetId(), setTagsId) {
if !utils.IsInStringArray(oldTag.GetSchedtagId(), setTagsId) {
if err := oldTag.Detach(ctx, userCred); err != nil {
return nil, httperrors.NewGeneralError(err)
}