From 5095367c2e4790b5e518fca969b5a71a340f9fdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Wed, 21 Sep 2016 10:35:44 +0200 Subject: [PATCH] Create task of certain type --- attract/tasks.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/attract/tasks.py b/attract/tasks.py index 4b06b70..fc700cc 100644 --- a/attract/tasks.py +++ b/attract/tasks.py @@ -65,9 +65,10 @@ def save(project, task_id): # TODO: remove GET method once Pablo has made a proper button to call this URL with a POST. @blueprint.route('//create', methods=['POST', 'GET']) +@blueprint.route('//create/', methods=['POST', 'GET']) @attract_project_view() -def create_task(project): - task = current_task_manager.create_task(project) +def create_task(project, task_type=None): + task = current_task_manager.create_task(project, task_type=task_type) resp = flask.make_response() resp.headers['Location'] = flask.url_for('attract.tasks.view_embed_task',