From 822c1c8339c429f8ec1b48a50eedf6289e74e96d Mon Sep 17 00:00:00 2001 From: Kavalar Date: Wed, 3 May 2023 23:41:25 +0300 Subject: [PATCH] fix update column --- frontend/modules/api/controllers/ProjectColumnController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/modules/api/controllers/ProjectColumnController.php b/frontend/modules/api/controllers/ProjectColumnController.php index 047fa5a..84d4545 100644 --- a/frontend/modules/api/controllers/ProjectColumnController.php +++ b/frontend/modules/api/controllers/ProjectColumnController.php @@ -170,7 +170,7 @@ class ProjectColumnController extends ApiController * ), * ) * - * @return ProjectColumn|null + * @return array|ProjectColumn|\yii\db\ActiveRecord|null * @throws BadRequestHttpException * @throws \yii\base\InvalidConfigException */ @@ -181,7 +181,7 @@ class ProjectColumnController extends ApiController throw new BadRequestHttpException(json_encode(['Column not found'])); } - $column = ProjectColumn::find()->where(['id' => $column_id, 'status' => ProjectColumn::STATUS_ACTIVE]); + $column = ProjectColumn::find()->where(['id' => $column_id, 'status' => ProjectColumn::STATUS_ACTIVE])->one(); $put = array_diff(\Yii::$app->request->getBodyParams(), [null, '']);