Use template args for the contract start and end date

pointing to base.ini in the JS file resulted in the raw string content of base.ini to be in the JS bundle
This commit is contained in:
leigh-mil
2019-09-09 14:23:38 -04:00
parent 6dea274c0a
commit 3683c79ae0
4 changed files with 26 additions and 13 deletions

View File

@@ -7,6 +7,7 @@ from flask import (
current_app as app,
jsonify,
)
from datetime import datetime
from . import task_orders_bp
from atst.domain.authz.decorator import user_can_access_decorator as user_can
@@ -22,6 +23,9 @@ def render_task_orders_edit(
):
render_args = extra_args or {}
render_args["contract_start"] = app.config.get("CONTRACT_START_DATE")
render_args["contract_end"] = app.config.get("CONTRACT_END_DATE")
if task_order_id:
task_order = TaskOrders.get(task_order_id)
portfolio_id = task_order.portfolio_id