diff --git a/agent/app/service/app.go b/agent/app/service/app.go index 615f6438d..133f54651 100644 --- a/agent/app/service/app.go +++ b/agent/app/service/app.go @@ -1075,7 +1075,7 @@ func (a AppService) SyncAppListFromRemote(taskID string) (err error) { tagId, ok := tagMap[tag] if ok { exist, _ := appTagRepo.GetFirst(ctx, appTagRepo.WithByTagID(tagId), appTagRepo.WithByAppID(app.ID)) - if exist != nil { + if exist == nil { appTags = append(appTags, &model.AppTag{ AppId: app.ID, TagId: tagId,