Skip to content

Commit

Permalink
fix $dataPath for sourceDataCheck category
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnRDOrazio committed Nov 20, 2024
1 parent acafabc commit c598d06
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/Health.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,16 +342,10 @@ private static function retrieveSchemaForCategory(string $category, ?string $dat
*/
private function executeValidation(object $validation, ConnectionInterface $to)
{
if (property_exists($validation, 'sourceFolder')) {
if ($validation->category === 'sourceDataCheck') {
$dataPath = $validation->validate;
} elseif (property_exists($validation, 'sourceFile')) {
$dataPath = $validation->sourceFile;
} else {
$message = new \stdClass();
$message->type = "error";
$message->text = "The validation object is missing the sourceFile or sourceFolder property";
$this->sendMessage($to, $message);
return;
$dataPath = $validation->sourceFile;
}

$schema = Health::retrieveSchemaForCategory($validation->category, $dataPath);
Expand Down

0 comments on commit c598d06

Please sign in to comment.