Fixed missing task links
This commit is contained in:
parent
f1fae05cdd
commit
964258a1b7
1 changed files with 3 additions and 0 deletions
|
|
@ -23,6 +23,8 @@ class TaskSchema(Schema):
|
||||||
_start_time = fields.String(data_key="start_time")
|
_start_time = fields.String(data_key="start_time")
|
||||||
_end_time = fields.String(data_key="end_time")
|
_end_time = fields.String(data_key="end_time")
|
||||||
|
|
||||||
|
links = fields.Dict()
|
||||||
|
|
||||||
# TODO: Automate this somewhat
|
# TODO: Automate this somewhat
|
||||||
@pre_dump
|
@pre_dump
|
||||||
def generate_links(self, data, **kwargs):
|
def generate_links(self, data, **kwargs):
|
||||||
|
|
@ -50,6 +52,7 @@ class TaskResource(Resource):
|
||||||
@marshal_with(TaskSchema())
|
@marshal_with(TaskSchema())
|
||||||
def get(self, id):
|
def get(self, id):
|
||||||
try:
|
try:
|
||||||
|
print(tasks.dict())
|
||||||
task = tasks.dict()[id]
|
task = tasks.dict()[id]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
return abort(404) # 404 Not Found
|
return abort(404) # 404 Not Found
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue