Skip to content

Commit

Permalink
[Hardening] fixup Legend links
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Nov 15, 2019
1 parent adeee4c commit bbc8fe3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def handle(self, *args, **options):
'ows?service=WMS&request=GetLegendGraphic&format=image/png&WIDTH=20&HEIGHT=20&LAYER=' + \
'{alternate}&STYLE={style_name}' + \
'&legend_options=fontAntiAliasing:true;fontSize:12;forceLabels:on'
if not layer.get_legend_url(style_name=layer.default_style.name):
if layer.default_style and not layer.get_legend_url(style_name=layer.default_style.name):
Link.objects.update_or_create(
resource=layer.resourcebase_ptr,
name='Legend',
Expand Down

0 comments on commit bbc8fe3

Please sign in to comment.