fix example

This commit is contained in:
Yuri Kuznetsov
2024-11-23 11:58:49 +02:00
parent 766b0327b1
commit 113bf0feec
@@ -38,6 +38,7 @@ use Espo\Entities\LeadCapture;
use Espo\Modules\Crm\Entities\Lead;
use Espo\ORM\Entity;
use Espo\ORM\EntityManager;
use Espo\ORM\Type\AttributeType;
/**
* @implements Loader<LeadCapture>
@@ -105,7 +106,16 @@ class ExampleLoader implements Loader
foreach ($attributeList as $i => $attribute) {
$value = strtoupper(Util::camelCaseToUnderscore($attribute));
if (in_array($seed->getAttributeType($attribute), [Entity::VARCHAR, Entity::TEXT])) {
if (
in_array(
$seed->getAttributeType($attribute), [
Entity::VARCHAR,
Entity::TEXT,
AttributeType::DATETIME,
AttributeType::DATE,
]
)
) {
$value = '"' . $value . '"';
}