do not overwrite the instructionsForEndUser on the spec object with the rendered instructions w/ burnettk (#1135)

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
This commit is contained in:
jasquat 2024-02-29 14:39:12 -05:00 committed by GitHub
parent 87fd3ddf65
commit 0565e63e98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -48,9 +48,7 @@ class JinjaService:
if extensions and "instructionsForEndUser" in extensions:
if extensions["instructionsForEndUser"]:
try:
instructions = cls.render_jinja_template(extensions["instructionsForEndUser"], task)
extensions["instructionsForEndUser"] = instructions
return instructions
return cls.render_jinja_template(extensions["instructionsForEndUser"], task)
except TaskModelError as wfe:
wfe.add_note("Failed to render instructions for end user.")
raise ApiError.from_workflow_exception("instructions_error", str(wfe), exp=wfe) from wfe