Skip to content

Commit

Permalink
[Minor fix] Do not break the map if cannot read the syles from GeoServer
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed May 15, 2019
1 parent 12bd465 commit c2f0e6d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions geonode/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,8 +621,11 @@ def layer_config(self, user=None):
if self.opacity:
cfg['opacity'] = self.opacity
if self.styles:
cfg['styles'] = ast.literal_eval(self.styles) \
if isinstance(self.styles, six.string_types) else self.styles
try:
cfg['styles'] = ast.literal_eval(self.styles) \
if isinstance(self.styles, six.string_types) else self.styles
except BaseException:
pass
if self.transparent:
cfg['transparent'] = True

Expand Down

0 comments on commit c2f0e6d

Please sign in to comment.