From 19b0101718f5da701ab5a8999715d4b090789232 Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Wed, 12 Feb 2020 13:52:57 +0000 Subject: [PATCH] Make action links external --- openflexure_microscope/api/v2/views/actions/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openflexure_microscope/api/v2/views/actions/__init__.py b/openflexure_microscope/api/v2/views/actions/__init__.py index aa4a2ae9..abab2118 100644 --- a/openflexure_microscope/api/v2/views/actions/__init__.py +++ b/openflexure_microscope/api/v2/views/actions/__init__.py @@ -1,7 +1,7 @@ """ Top-level representation of enabled actions """ - +from flask import url_for from . import camera, stage, system from labthings.server.view import View @@ -74,7 +74,7 @@ class ActionsView(View): d = { "links": { "self": { - "href": current_labthing().url_for(action["view_class"]), + "href": url_for(action["view_class"].endpoint, _external=True), "mimetype": "application/json", **description_from_view(action["view_class"]), }