task-show-render-instructions-fix (#1142)

* add the jinja rendered instructions back to the extensions list before returning

* fixed comment

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
This commit is contained in:
jasquat 2024-03-01 10:49:44 -05:00 committed by GitHub
parent e909cf7a21
commit 346d7a4660
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -544,7 +544,9 @@ def task_show(
else:
task_model.form_ui_schema = {}
_munge_form_ui_schema_based_on_hidden_fields_in_task_data(task_model.form_ui_schema, task_model.data)
JinjaService.render_instructions_for_end_user(task_model, extensions)
# it should be safe to add instructions to the task spec here since we are never commiting it back to the db
extensions["instructionsForEndUser"] = JinjaService.render_instructions_for_end_user(task_model, extensions)
task_model.extensions = extensions