From 80cc74bd3dca2dab140a2a5ce387ec198e5138c9 Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Thu, 24 Jan 2019 14:14:25 +0000 Subject: [PATCH] Fixed plugin blueprint method name clashing --- openflexure_microscope/api/v1/blueprints/plugins.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openflexure_microscope/api/v1/blueprints/plugins.py b/openflexure_microscope/api/v1/blueprints/plugins.py index ac794c92..97d9bd39 100644 --- a/openflexure_microscope/api/v1/blueprints/plugins.py +++ b/openflexure_microscope/api/v1/blueprints/plugins.py @@ -26,6 +26,7 @@ def construct_blueprint(microscope_obj, plugin_paths=[], include_default=True): # Construct a full view route from the plugin name full_view_route = "/{}/{}".format(plugin_name, view_route) + logging.debug(full_view_route) # Check if endpoint name clashes if full_view_route not in all_routes and issubclass(view_class, MicroscopeViewPlugin): @@ -36,7 +37,7 @@ def construct_blueprint(microscope_obj, plugin_paths=[], include_default=True): blueprint.add_url_rule( full_view_route, view_func=view_class.as_view( - 'plugin_{}'.format(view_route).replace('/', '_'), + 'plugin_{}'.format(full_view_route).replace('/', '_'), microscope=microscope_obj, plugin=plugin_obj )