File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ package v2beta1
2727import (
2828 "errors"
2929 "log"
30+ "slices"
3031 "strconv"
3132 "strings"
3233
@@ -153,6 +154,16 @@ func (src *WMS) ToV3(target *pdoknlv3.WMS) error {
153154 Keys : cm .Keys ,
154155 })
155156 }
157+
158+ if len (src .Spec .Service .StylingAssets .ConfigMapRefs ) == 1 {
159+ for _ , layer := range src .Spec .Service .Layers {
160+ for _ , style := range layer .Styles {
161+ if style .Visualization != nil && ! slices .Contains (src .Spec .Service .StylingAssets .ConfigMapRefs [0 ].Keys , * style .Visualization ) {
162+ src .Spec .Service .StylingAssets .ConfigMapRefs [0 ].Keys = append (src .Spec .Service .StylingAssets .ConfigMapRefs [0 ].Keys , * style .Visualization )
163+ }
164+ }
165+ }
166+ }
156167 }
157168
158169 dst .Spec .Service = service
You can’t perform that action at this time.
0 commit comments