From 2d00ed3b5810be672d5b98d78d425cf5942ce2e4 Mon Sep 17 00:00:00 2001 From: dengzhiwen1 Date: Tue, 14 Feb 2023 16:34:13 +0800 Subject: [PATCH] fix wrong add for set when tags are set --- internal/model.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/model.go b/internal/model.go index 0fd7955b..f058925d 100644 --- a/internal/model.go +++ b/internal/model.go @@ -73,15 +73,15 @@ func (sd *SubscriptionData) Clone() *SubscriptionData { if sd.Tags.Items() != nil { cloned.Tags = utils.NewSet() - for _, value := range sd.Tags.Items() { - cloned.Tags.Add(value) + for key, value := range sd.Tags.Items() { + cloned.Tags.AddKV(key, value.UniqueID()) } } if sd.Codes.Items() != nil { cloned.Codes = utils.NewSet() - for _, value := range sd.Codes.Items() { - cloned.Codes.Add(value) + for key, value := range sd.Codes.Items() { + cloned.Codes.AddKV(key, value.UniqueID()) } }