Skip to content

Commit 2f1b117

Browse files
author
Joel Collins
committed
Updated ActionSchema links to new /actions view
1 parent 315225d commit 2f1b117

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/labthings/schema.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from marshmallow import Schema, pre_load, pre_dump, validate
55
from collections.abc import Mapping
66

7-
from .names import TASK_ENDPOINT, EXTENSION_LIST_ENDPOINT
7+
from .names import ACTION_ENDPOINT, TASK_ENDPOINT, EXTENSION_LIST_ENDPOINT
88
from .utilities import view_class_from_endpoint, description_from_view
99
from . import fields
1010

@@ -114,7 +114,7 @@ class ActionSchema(Schema):
114114
def generate_links(self, data, **kwargs):
115115
# Add Mozilla format href
116116
try:
117-
url = url_for(TASK_ENDPOINT, task_id=data.id, _external=True)
117+
url = url_for(ACTION_ENDPOINT, task_id=data.id, _external=True)
118118
except BuildError:
119119
url = None
120120
data.href = url
@@ -124,7 +124,7 @@ def generate_links(self, data, **kwargs):
124124
"self": {
125125
"href": url,
126126
"mimetype": "application/json",
127-
**description_from_view(view_class_from_endpoint(TASK_ENDPOINT)),
127+
**description_from_view(view_class_from_endpoint(ACTION_ENDPOINT)),
128128
}
129129
}
130130

0 commit comments

Comments
 (0)