fix: resource set schedtags

This commit is contained in:
Zexi
2019-05-07 12:12:48 +08:00
parent 4b74d26de2
commit 7be7ae0b12
+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)
}