Update WorkorderTenantConfigModel.php

This commit is contained in:
Luca Haid
2025-09-02 11:25:56 +00:00
parent 042c84cecc
commit 83832ab3b7

View File

@@ -7,6 +7,7 @@ class WorkorderTenantConfigModel extends TTCrudBaseModel {
public string $name;
public string $documentationTypes; // JSON
public string $workorderCreationFilters; // JSON
public string $interventionTypes; // JSON
public int $civilEngineeringDocsRequired;
public int $create;
public int $createBy;
@@ -25,8 +26,7 @@ class WorkorderTenantConfigModel extends TTCrudBaseModel {
JOIN `$dbName`.`Preorder` p ON pc.id = p.preordercampaign_id
WHERE p.id = '$preorderId' LIMIT 1";
$result = $db->query($sql);
$row = $result ? $result->fetch_assoc() : null;
$row = $db->query($sql)?->fetch_assoc();
return $row ? new self($row) : null;
}}