Fixes a bug where the CLIN type was not displaying correctly for saved

TOs.

The enum for the CLIN type needs to be coerced in the form data so that
the `jedi_clin_field` data is the value of the enum option. Perviously
the `jedi_clin_field` was being populated with a stringified
representation of the enum, like `JEDICLINType.JEDI_CLIN_1`.
This commit is contained in:
dandds
2019-06-18 11:29:38 -04:00
parent 632cd82398
commit c4d8067f45
5 changed files with 25 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ def render_task_orders_edit(portfolio_id=None, task_order_id=None, form=None):
if task_order_id:
task_order = TaskOrders.get(task_order_id)
portfolio_id = task_order.portfolio_id
render_args["form"] = form or TaskOrderForm(**task_order.to_dictionary())
render_args["form"] = form or TaskOrderForm(obj=task_order)
render_args["task_order_id"] = task_order_id
render_args["task_order"] = task_order
else: