From 3022f6056194c0d82c56aa52640456d9a5336f56 Mon Sep 17 00:00:00 2001 From: Ashish Kumar Sinha Date: Fri, 21 Jun 2019 13:28:02 +0530 Subject: [PATCH] Stop duplicate entry in Notification.xml (#7690) fixes #7671 --- pkg/event/config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/event/config.go b/pkg/event/config.go index 3ec576476..50fb35995 100644 --- a/pkg/event/config.go +++ b/pkg/event/config.go @@ -222,6 +222,10 @@ func (conf *Config) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error { if len(parsedConfig.QueueList) > 0 { for i, q1 := range parsedConfig.QueueList[:len(parsedConfig.QueueList)-1] { for _, q2 := range parsedConfig.QueueList[i+1:] { + // Removes the region from ARN if server region is not set + if q2.ARN.region != "" && q1.ARN.region == "" { + q2.ARN.region = "" + } if reflect.DeepEqual(q1, q2) { return &ErrDuplicateQueueConfiguration{q1} }