Skip to content

Commit

Permalink
fix: issue related to styles
Browse files Browse the repository at this point in the history
  • Loading branch information
jdonlucas committed Aug 16, 2023
1 parent b8f88d7 commit f47a31f
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 @@ -451,7 +451,9 @@ 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)
time_delta = datetime.datetime.now(datetime.timezone.utc) - saved_dataset.created
if time_delta.seconds < 60:
gs_catalog.delete(_s)
Link.objects.filter(
resource=saved_dataset.resourcebase_ptr, name="Legend", url__contains=f"STYLE={_s.name}"
).delete()
Expand Down

0 comments on commit f47a31f

Please sign in to comment.