From b1b4aae009f04f42345797fdbb258591d71a6894 Mon Sep 17 00:00:00 2001 From: Barry Brands Date: Tue, 8 Oct 2024 15:36:22 +0200 Subject: [PATCH] Code improvement --- src/Service/ZaakService.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Service/ZaakService.php b/src/Service/ZaakService.php index 61cca70..eaabd0a 100644 --- a/src/Service/ZaakService.php +++ b/src/Service/ZaakService.php @@ -505,17 +505,20 @@ public function zaakHandler(?array $data = [], ?array $configuration = []) } if (isset($data['caseId']) === true) { - $this->getZaak($configuration, $data['caseId']); - - return $data; + $zaak = $this->getZaak($configuration, $data['caseId']); } if (isset($data['body']['case_uuid']) === true) { $zaak = $this->getZaak($configuration, $data['body']['case_uuid']); + } + // Check if we already synced the zaak. + if (isset($zaak) === true) { + // Check if we need to update the taak with the zaak url. if (isset($data['taakId']) === true) { $this->updateTaak($zaak, $data['taakId']); } + return $data; }