From 113bf0feec75e55a6a9b4b494cf5315999d40f7f Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Sat, 23 Nov 2024 11:58:49 +0200 Subject: [PATCH] fix example --- .../FieldProcessing/LeadCapture/ExampleLoader.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/application/Espo/Classes/FieldProcessing/LeadCapture/ExampleLoader.php b/application/Espo/Classes/FieldProcessing/LeadCapture/ExampleLoader.php index d8b88005de..de5f87559c 100644 --- a/application/Espo/Classes/FieldProcessing/LeadCapture/ExampleLoader.php +++ b/application/Espo/Classes/FieldProcessing/LeadCapture/ExampleLoader.php @@ -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 @@ -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 . '"'; }