ckan / ckanext-geoview

CKAN Geospatial ResourceView
MIT License
43 stars 60 forks source link

Exception if resource_proxy not enabled(?) #8

Closed mattfullerton closed 9 years ago

mattfullerton commented 9 years ago

This code: https://github.com/ckan/ckanext-geoview/blob/master/ckanext/geoview/plugin.py#L149-L157

Is a problem. If we are on the same domain or the proxy is not enabled, proxy_service_url does not get set, even though it is unconditionally needed later

makkus commented 9 years ago

Is there a workaround for the 'same domain' case? I'm getting 'UnboundLocalError: local variable 'proxy_service_url' referenced before assignment' when trying to create a geoview-view.

mattfullerton commented 9 years ago

Yes, you can insert "proxy_service_url = None" before "if self.proxy_enabled and not same_domain:" in the file ckanext/geoview/plugin.py

I'll send a pull request now.