Skip to content

Commit

Permalink
Update helpers.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessio Fabiani authored Jul 3, 2018
1 parent 515b839 commit f61bc85
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion geonode/geoserver/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,10 @@ def set_styles(layer, gs_catalog):
# make sure we are not using a defaul SLD (which won't be editable)
if not default_style.workspace or default_style.workspace != layer.workspace:
sld_body = default_style.sld_body
gs_catalog.create_style(layer.name, sld_body, raw=True, workspace=layer.workspace)
try:
gs_catalog.create_style(layer.name, sld_body, raw=True, workspace=layer.workspace)
except BaseException:
pass
style = gs_catalog.get_style(layer.name, workspace=layer.workspace)
else:
style = default_style
Expand Down

0 comments on commit f61bc85

Please sign in to comment.