Create task of certain type

This commit is contained in:
2016-09-21 10:35:44 +02:00
parent 10cdf746f3
commit 5095367c2e

View File

@@ -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. # TODO: remove GET method once Pablo has made a proper button to call this URL with a POST.
@blueprint.route('/<project_url>/create', methods=['POST', 'GET']) @blueprint.route('/<project_url>/create', methods=['POST', 'GET'])
@blueprint.route('/<project_url>/create/<task_type>', methods=['POST', 'GET'])
@attract_project_view() @attract_project_view()
def create_task(project): def create_task(project, task_type=None):
task = current_task_manager.create_task(project) task = current_task_manager.create_task(project, task_type=task_type)
resp = flask.make_response() resp = flask.make_response()
resp.headers['Location'] = flask.url_for('attract.tasks.view_embed_task', resp.headers['Location'] = flask.url_for('attract.tasks.view_embed_task',