From 020bbb0e842fb0c83984c5f88abc25f1438b6915 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Tue, 5 Nov 2024 13:23:48 +1300 Subject: [PATCH] FIX Change type to Int --- code/BasicFieldsTestPage.php | 4 ++-- code/Company.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/BasicFieldsTestPage.php b/code/BasicFieldsTestPage.php index 79caf29..b54e847 100644 --- a/code/BasicFieldsTestPage.php +++ b/code/BasicFieldsTestPage.php @@ -71,7 +71,7 @@ class BasicFieldsTestPage extends TestPage 'TimeHTML5' => 'Time', 'ToggleCompositeTextField1' => 'Varchar', 'ToggleCompositeDropdownField' => 'Varchar', - 'Validated' => 'Text', + 'Validated' => 'Int', ); private static $has_one = array( @@ -187,7 +187,7 @@ public function getDefaultData() 'Time' => "23:59", 'TimeHTML5' => "23:59", 'ToggleCompositeTextField1' => 'My value (รค!)', - 'Validated' => '1', + 'Validated' => 1, ); } diff --git a/code/Company.php b/code/Company.php index 5e27c21..c082b58 100644 --- a/code/Company.php +++ b/code/Company.php @@ -129,7 +129,7 @@ public function requireDefaultRecords() $company = new Company(); $company->Name = $companyData[0]; $company->Category = $companyData[1]; - $company->Revenue = $companyData[2]; + $company->Revenue = (float) $companyData[2]; $company->CEO = $companyData[3]; $company->write(); }