diff --git a/geonode/catalogue/backends/pycsw_local.py b/geonode/catalogue/backends/pycsw_local.py index 4bfa8819b94..b56b677e777 100644 --- a/geonode/catalogue/backends/pycsw_local.py +++ b/geonode/catalogue/backends/pycsw_local.py @@ -124,10 +124,11 @@ def _csw_local_dispatch(self, keywords=None, start=0, limit=10, bbox=None, ident HTTP-less CSW """ - mdict = dict(settings.PYCSW["CONFIGURATION"], **CONFIGURATION) - if "server" in settings.PYCSW["CONFIGURATION"]: - # override server system defaults with user specified directives - mdict["server"].update(settings.PYCSW["CONFIGURATION"]["server"]) + mdict = dict(CONFIGURATION, **settings.PYCSW["CONFIGURATION"]) + # if "server" in settings.PYCSW["CONFIGURATION"]: + # # override server system defaults with user specified directives + # # When swapping parameters from dict(), this if statement becomes useless + # mdict["server"].update(settings.PYCSW["CONFIGURATION"]["server"]) # fake HTTP environment variable os.environ["QUERY_STRING"] = "" diff --git a/geonode/catalogue/views.py b/geonode/catalogue/views.py index abb18b76e5b..b724e7c9cc0 100644 --- a/geonode/catalogue/views.py +++ b/geonode/catalogue/views.py @@ -46,7 +46,7 @@ def csw_global_dispatch(request, dataset_filter=None, config_updater=None): if settings.CATALOGUE["default"]["ENGINE"] != "geonode.catalogue.backends.pycsw_local": return HttpResponseRedirect(settings.CATALOGUE["default"]["URL"]) - mdict = dict(settings.PYCSW["CONFIGURATION"], **CONFIGURATION) + mdict = dict(CONFIGURATION, **settings.PYCSW["CONFIGURATION"]) mdict = config_updater(mdict) if config_updater else mdict access_token = None