From e31925a574175254338232975c1dd036e3aaf162 Mon Sep 17 00:00:00 2001 From: Aleksey Filippov Date: Sat, 7 Mar 2026 01:52:31 +0300 Subject: [PATCH] fix(TO8-22): is_promo_balance boolean validation in Promocode model MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Колонка is_promo_balance в PostgreSQL — boolean, а валидатор был integer. PDO возвращает PHP false → IntegerValidator падает: "должно быть целым числом". --- erp24/records/Promocode.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erp24/records/Promocode.php b/erp24/records/Promocode.php index 995b7670..35b37fb1 100644 --- a/erp24/records/Promocode.php +++ b/erp24/records/Promocode.php @@ -49,7 +49,8 @@ class Promocode extends \yii\db\ActiveRecord return [ [['code', 'bonus', 'duration', 'active', 'date_start', 'date_end', 'created_by', 'created_at'], 'required'], [['code'], 'string', 'max' => 20], - [['bonus', 'duration', 'active', 'used', 'base', 'parent_id', 'created_by', 'updated_by', 'is_promo_balance'], 'integer'], + [['bonus', 'duration', 'active', 'used', 'base', 'parent_id', 'created_by', 'updated_by'], 'integer'], + [['is_promo_balance'], 'boolean'], [['date_start', 'date_end', 'created_at', 'updated_at'], 'datetime', 'format' => 'php:Y-m-d H:i:s'], [['activated_by'], 'integer'], [['activated_at'], 'datetime', 'format' => 'php:Y-m-d H:i:s'], -- 2.39.5