Skip to content

Commit

Permalink
Reset the package plugin in environment to accommodate legacy tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Jun 8, 2018
1 parent 0ac7f5b commit 1cc68b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion ckan/config/environment.py
Expand Up @@ -223,6 +223,10 @@ def update_config():
search.check_solr_schema_version()

routes_map = routing.make_map()

lib_plugins.reset_package_plugins()
lib_plugins.set_default_package_plugin()

config['routes.map'] = routes_map
# The RoutesMiddleware needs its mapper updating if it exists
if 'routes.middleware' in config:
Expand All @@ -236,7 +240,6 @@ def update_config():
helpers.load_plugin_helpers()
config['pylons.h'] = helpers.helper_functions

lib_plugins.set_default_package_plugin()

# Templates and CSS loading from configuration
valid_base_templates_folder_names = ['templates', 'templates-bs2']
Expand Down
1 change: 0 additions & 1 deletion ckan/config/routing.py
Expand Up @@ -86,7 +86,6 @@ def make_map():
OPTIONS = dict(method=['OPTIONS'])

import ckan.lib.plugins as lib_plugins
lib_plugins.reset_package_plugins()
lib_plugins.reset_group_plugins()

map = Mapper(directory=config['pylons.paths']['controllers'],
Expand Down

0 comments on commit 1cc68b2

Please sign in to comment.