From 307c9daaf4bff3f861f77cf5ec9e7abe1086e191 Mon Sep 17 00:00:00 2001 From: Benn Oshrin Date: Mon, 22 Jul 2019 17:04:01 +0800 Subject: [PATCH] Fix handling of required attribute (CO-1770) --- app/src/Lib/Match/MatchService.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/Lib/Match/MatchService.php b/app/src/Lib/Match/MatchService.php index 01e259be5..e5470e764 100644 --- a/app/src/Lib/Match/MatchService.php +++ b/app/src/Lib/Match/MatchService.php @@ -472,11 +472,11 @@ protected function search(string $mode, if(!$val) { if($ruleattr->attribute->required) { Log::write('debug', $sor . "/" . $sorid . " No value found for required attribute " . $ruleattr->attribute->name . " skipping rule " . $rule->name); - throw new \RuntimeException(__('match.er.attr.req', [$ruleattr->attribute->name])); + continue 2; } - Log::write('debug', $sor . "/" . $sorid . " No value found for attribute " . $ruleattr->attribute->name . " skipping rule " . $rule->name); - continue 2; + Log::write('debug', $sor . "/" . $sorid . " No value found for attribute " . $ruleattr->attribute->name . " skipping"); + continue; } $andclause = "";