Handle uploaded file in task order route
This commit is contained in:
parent
4a377007f6
commit
ebf063f245
@ -272,8 +272,9 @@ def new(screen, task_order_id=None, portfolio_id=None):
|
||||
"/portfolios/<portfolio_id>/task_orders/new/<int:screen>", methods=["POST"]
|
||||
)
|
||||
def update(screen, task_order_id=None, portfolio_id=None):
|
||||
form_data = {**http_request.form, **http_request.files}
|
||||
workflow = UpdateTaskOrderWorkflow(
|
||||
g.current_user, http_request.form, screen, task_order_id, portfolio_id
|
||||
g.current_user, form_data, screen, task_order_id, portfolio_id
|
||||
)
|
||||
|
||||
if workflow.validate():
|
||||
|
@ -10,9 +10,9 @@
|
||||
|
||||
{% block form_action %}
|
||||
{% if task_order_id %}
|
||||
<form method='POST' action="{{ url_for('task_orders.new', screen=current, task_order_id=task_order_id) }}" autocomplete="off">
|
||||
<form method='POST' action="{{ url_for('task_orders.new', screen=current, task_order_id=task_order_id) }}" autocomplete="off" enctype="multipart/form-data">
|
||||
{% else %}
|
||||
<form method='POST' action="{{ url_for('task_orders.update', screen=current, portfolio_id=portfolio_id) }}" autocomplete="off">
|
||||
<form method='POST' action="{{ url_for('task_orders.update', screen=current, portfolio_id=portfolio_id) }}" autocomplete="off" enctype="multipart/form-data">
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user