From be2cfb908a5000f0d8a02518a6fcb926e964a896 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Thu, 12 Aug 2021 13:01:20 -0700 Subject: [PATCH] IO-1312 Resolve delivery checklist issue. --- .../job-checklist-form.component.jsx | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/client/src/components/job-checklist/components/job-checklist-form/job-checklist-form.component.jsx b/client/src/components/job-checklist/components/job-checklist-form/job-checklist-form.component.jsx index cc61d1aa3..7495ec6cc 100644 --- a/client/src/components/job-checklist/components/job-checklist-form/job-checklist-form.component.jsx +++ b/client/src/components/job-checklist/components/job-checklist-form/job-checklist-form.component.jsx @@ -117,21 +117,22 @@ export function JobChecklistForm({ }); } } - - //Updae Owner Allow to Text - const updateOwnerResult = await updateOwner({ - variables: { - ownerId: job.owner.id, - owner: { allow_text_message: values.allow_text_message }, - }, - }); - - if (!!updateOwnerResult.errors) { - notification["error"]({ - message: t("checklist.errors.complete", { - error: JSON.stringify(result.errors), - }), + if (type === "intake" && job.owner && job.owner.id) { + //Updae Owner Allow to Text + const updateOwnerResult = await updateOwner({ + variables: { + ownerId: job.owner.id, + owner: { allow_text_message: values.allow_text_message }, + }, }); + + if (!!updateOwnerResult.errors) { + notification["error"]({ + message: t("checklist.errors.complete", { + error: JSON.stringify(result.errors), + }), + }); + } } setLoading(false);