Skip to content

Commit

Permalink
[Fixes #4178] - Unable to create maps with access_token no longer string
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Jan 25, 2019
1 parent 704b8d5 commit 65177ca
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion geonode/contrib/worldmap/wm_extra/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ def add_layers_to_map_config(request, map_obj, layer_names, add_base_layers=True
service_url = urlparse.urlsplit(service.base_url).netloc

if access_token and ogc_server_url == service_url and 'access_token' not in service.base_url:
url = service.base_url + '?access_token=' + access_token
url = '%s?access_token=%s' % (service.base_url, access_token)
else:
url = service.base_url
maplayer = MapLayer(map=map_obj,
Expand Down
3 changes: 1 addition & 2 deletions geonode/maps/qgis_server_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,7 @@ def get_context_data(self, **kwargs):

if access_token and ogc_server_url == service_url and \
'access_token' not in service.base_url:
url = service.base_url + \
'?access_token=' + access_token
url = '%s?access_token=%s' % (service.base_url, access_token)
else:
url = service.base_url
map_layers = MapLayer(map=map_obj,
Expand Down
2 changes: 1 addition & 1 deletion geonode/maps/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,7 @@ def sld_definition(style):

access_token = request.session['access_token'] if request and 'access_token' in request.session else None
if access_token and ogc_server_url == layer_url and 'access_token' not in layer.ows_url:
url = layer.ows_url + '?access_token=' + access_token
url = '%s?access_token=%s' % (layer.ows_url, access_token)
else:
url = layer.ows_url
maplayer = MapLayer(
Expand Down

0 comments on commit 65177ca

Please sign in to comment.