From 166893043992a1d7aa6f53ac213fca6bcef15450 Mon Sep 17 00:00:00 2001 From: Luca Orlandini Date: Fri, 19 Mar 2021 09:38:22 +0100 Subject: [PATCH] [Fixes #7102] All new Styles seem to be called Default Styler, not their actual name (#7103) * css format style name * remove unquote * remove blank lines Co-authored-by: Alessio Fabiani --- geonode/geoserver/helpers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/geonode/geoserver/helpers.py b/geonode/geoserver/helpers.py index 61d81af45c1..63d5e7313ad 100755 --- a/geonode/geoserver/helpers.py +++ b/geonode/geoserver/helpers.py @@ -1191,7 +1191,9 @@ def save_style(gs_style, layer): style, created = Style.objects.get_or_create(name=style_name) if not style.workspace and gs_style.workspace: style.workspace = layer.workspace - style.sld_title = gs_style.sld_title or sld_name + + title = gs_style.sld_title if gs_style.style_format != 'css' else sld_name + style.sld_title = title style.sld_body = gs_style.sld_body style.sld_url = gs_style.body_href style.save()