From 20bbf5ab212830a0ed8499564ff2d42703e82d35 Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Sat, 28 Dec 2019 18:55:13 +0000 Subject: [PATCH] Removed blueprint stuff from owns_endpoint --- .../common/flask_labthings/labthing.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/openflexure_microscope/common/flask_labthings/labthing.py b/openflexure_microscope/common/flask_labthings/labthing.py index c3662192..a9085fab 100644 --- a/openflexure_microscope/common/flask_labthings/labthing.py +++ b/openflexure_microscope/common/flask_labthings/labthing.py @@ -218,17 +218,6 @@ class LabThing(object): return url_for(endpoint, **values) def owns_endpoint(self, endpoint): - """Tests if an endpoint name (not path) belongs to this Api. Takes - in to account the Blueprint name part of the endpoint name. - :param endpoint: The name of the endpoint being checked - :return: bool - """ - - if self.blueprint: - if endpoint.startswith(self.blueprint.name): - endpoint = endpoint.split(self.blueprint.name + ".", 1)[-1] - else: - return False return endpoint in self.endpoints ### Description