From 52f5eea7be64979fde70e8e22a3b16ce0a89061c Mon Sep 17 00:00:00 2001 From: xuwu1 Date: Thu, 1 Jun 2023 10:23:31 +0800 Subject: [PATCH] set exists slice as nil when load SDK data to schema model --- .../automation_software_update_configuration_resource.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/services/automation/automation_software_update_configuration_resource.go b/internal/services/automation/automation_software_update_configuration_resource.go index 9d98a526ce3e..fb71786ebcae 100644 --- a/internal/services/automation/automation_software_update_configuration_resource.go +++ b/internal/services/automation/automation_software_update_configuration_resource.go @@ -38,6 +38,7 @@ func (a *AzureQuery) LoadSDKTags(tags map[string][]string) { if tags == nil { return } + a.Tags = nil for k, vs := range tags { t := Tag{} t.Tag = k @@ -181,12 +182,14 @@ func (s *Schedule) LoadSDKModel(info *softwareupdateconfiguration.SUCSchedulePro if setting := info.AdvancedSchedule; setting != nil { s.AdvancedWeekDays = pointer.ToSliceOfStrings(setting.WeekDays) if setting.MonthDays != nil { + s.AdvancedMonthDays = nil for _, v := range *(setting.MonthDays) { s.AdvancedMonthDays = append(s.AdvancedMonthDays, int(v)) } } if setting.MonthlyOccurrences != nil { + s.MonthlyOccurrence = nil for _, occ := range *setting.MonthlyOccurrences { day := ""