Skip to content

Commit

Permalink
fix: deleting current styles from geoserver
Browse files Browse the repository at this point in the history
  • Loading branch information
jdonlucas committed Aug 16, 2023
1 parent cc19d65 commit b8f88d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions geonode/geoserver/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def set_dataset_style(saved_dataset, title, sld, base_file=None):
gs_catalog.save(layer)
for _s in _old_styles:
try:
gs_catalog.delete(_s)
# gs_catalog.delete(_s)
Link.objects.filter(
resource=saved_dataset.resourcebase_ptr, name="Legend", url__contains=f"STYLE={_s.name}"
).delete()
Expand Down Expand Up @@ -1179,8 +1179,8 @@ def change_default_style(layer,style):
def set_styles(layer, gs_catalog: Catalog):
style_set = []

# for _style in layer.styles.all():
# style_set.append(_style)
for _style in layer.styles.all():
style_set.append(_style)

gs_dataset = get_dataset(layer, gs_catalog)
if gs_dataset:
Expand Down

0 comments on commit b8f88d7

Please sign in to comment.