From 64f89c5355a3d37b2c57842958f329b351187fd9 Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Mon, 13 Jan 2020 16:32:51 +0000 Subject: [PATCH] Automatically tag extensions --- openflexure_microscope/common/flask_labthings/labthing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openflexure_microscope/common/flask_labthings/labthing.py b/openflexure_microscope/common/flask_labthings/labthing.py index c49d7e25..8c3fecfd 100644 --- a/openflexure_microscope/common/flask_labthings/labthing.py +++ b/openflexure_microscope/common/flask_labthings/labthing.py @@ -7,6 +7,7 @@ from .names import TASK_ENDPOINT, TASK_LIST_ENDPOINT, EXTENSION_LIST_ENDPOINT from .extensions import BaseExtension from .utilities import description_from_view from .spec import rule2path, get_spec +from .decorators import tag from .views.extensions import ExtensionList from .views.tasks import TaskList, TaskResource @@ -131,7 +132,7 @@ class LabThing(object): for extension_view_id, extension_view in extension_object.views.items(): # Add route to the extensions blueprint self.add_view( - extension_view["view"], + tag("extensions")(extension_view["view"]), "/extensions" + extension_view["rule"], **extension_view["kwargs"], )