only return guest_confirmation if it is a guest task
This commit is contained in:
parent
a089fedb6f
commit
3bf2e326e0
|
@ -807,7 +807,12 @@ def _task_submit_shared(
|
|||
if next_human_task_assigned_to_me:
|
||||
return make_response(jsonify(HumanTaskModel.to_task(next_human_task_assigned_to_me)), 200)
|
||||
|
||||
if "guestConfirmation" in spiff_task.task_spec.extensions:
|
||||
spiff_task_extensions = spiff_task.task_spec.extensions
|
||||
if (
|
||||
"allowGuest" in spiff_task_extensions
|
||||
and spiff_task_extensions["allowGuest"] == "true"
|
||||
and "guestConfirmation" in spiff_task.task_spec.extensions
|
||||
):
|
||||
return make_response(
|
||||
jsonify({"guest_confirmation": spiff_task.task_spec.extensions["guestConfirmation"]}), 200
|
||||
)
|
||||
|
|
|
@ -147,8 +147,12 @@ export default function TaskShow() {
|
|||
removeError();
|
||||
if (result.ok) {
|
||||
navigate(`/tasks`);
|
||||
} else if (result.guest_confirmation) {
|
||||
setGuestConfirmationText(result.guest_confirmation);
|
||||
} else if ('guest_confirmation' in result) {
|
||||
if (result.guest_confirmation) {
|
||||
setGuestConfirmationText(result.guest_confirmation);
|
||||
} else {
|
||||
setGuestConfirmationText('Form submitted successfully');
|
||||
}
|
||||
} else if (result.process_instance_id) {
|
||||
if (result.can_complete) {
|
||||
navigate(`/tasks/${result.process_instance_id}/${result.id}`);
|
||||
|
|
Loading…
Reference in New Issue