Skip to content

Commit

Permalink
[Fixes #7102] All new Styles seem to be called Default Styler, not th…
Browse files Browse the repository at this point in the history
…eir actual name (#7103)

* css format style name

* remove unquote

* remove blank lines

Co-authored-by: Alessio Fabiani <alessio.fabiani@geo-solutions.it>
  • Loading branch information
luorlandini and Alessio Fabiani authored Mar 19, 2021
1 parent 6fd5d5a commit 1668930
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion geonode/geoserver/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 1668930

Please sign in to comment.